Skip to content

Commit

Permalink
Revert "fix: allow installing 6.6"
Browse files Browse the repository at this point in the history
This reverts commit 33dab96.
  • Loading branch information
shyim committed Apr 3, 2024
1 parent 8767b00 commit 6bfd812
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions cmd/project/project_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func init() {
}

func fetchAvailableShopwareVersions(ctx context.Context) ([]string, error) {
r, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://raw.githubusercontent.com/FriendsOfShopware/shopware-static-data/main/data/php-version.json", http.NoBody)
r, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://releases.shopware.com/changelog/index.json", http.NoBody)
if err != nil {
return nil, err
}
Expand All @@ -180,19 +180,13 @@ func fetchAvailableShopwareVersions(ctx context.Context) ([]string, error) {
return nil, err
}

var shopwareToPHP map[string]string
var releases []string

if err := json.Unmarshal(content, &shopwareToPHP); err != nil {
if err := json.Unmarshal(content, &releases); err != nil {
return nil, err
}

versions := make([]string, 0, len(shopwareToPHP))

for version := range shopwareToPHP {
versions = append(versions, version)
}

return versions, nil
return releases, nil
}

func generateComposerJson(version string, rc bool) (string, error) {
Expand All @@ -202,10 +196,10 @@ func generateComposerJson(version string, rc bool) (string, error) {
"type": "project",
"require": {
"composer-runtime-api": "^2.0",
"shopware/administration": "*",
"shopware/administration": "{{ .Version }}",
"shopware/core": "{{ .Version }}",
"shopware/elasticsearch": "*",
"shopware/storefront": "*",
"shopware/elasticsearch": "{{ .Version }}",
"shopware/storefront": "{{ .Version }}",
"symfony/flex": "~2"
},
"repositories": [
Expand Down Expand Up @@ -276,6 +270,7 @@ func generateComposerJson(version string, rc bool) (string, error) {
Version: version,
RC: rc,
})

if err != nil {
return "", err
}
Expand Down

0 comments on commit 6bfd812

Please sign in to comment.