Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:deta/pc-cli into new-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
aavshr committed Oct 3, 2023
2 parents 8254475 + 77e08c4 commit 2113148
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,12 @@ func newCmdRelease() *cobra.Command {
}
}

spacefile, err := spacefile.LoadSpacefile(projectDir)
sf, err := spacefile.LoadSpacefile(projectDir)
if err != nil {
utils.Logger.Printf("Failed to load Spacefile: %v", err)
return err
}

discoveryData, err := getDiscoveryData(projectDir, spacefile)
discoveryData, err := getDiscoveryData(projectDir, sf)
if err != nil {
return fmt.Errorf("failed to get Discovery data, %w", err)
}
Expand Down Expand Up @@ -144,7 +143,7 @@ func newCmdRelease() *cobra.Command {

utils.Logger.Printf(getCreatingReleaseMsg(listedRelease, useLatestRevision))
err = release(projectDir, projectID, revisionID, releaseVersion,
listedRelease, releaseNotes, discoveryData, *spacefile.AutoPWA)
listedRelease, releaseNotes, discoveryData, *sf.AutoPWA)
if err != nil {
return err
}
Expand Down
4 changes: 4 additions & 0 deletions internal/spacefile/spacefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ func LoadSpacefile(projectDir string) (*Spacefile, error) {
spacefile.AutoPWA = new(bool)
*spacefile.AutoPWA = true
}
if spacefile.AutoPWA == nil {
spacefile.AutoPWA = new(bool)
*spacefile.AutoPWA = true
}

foundPrimaryMicro := false
micros := make(map[string]struct{})
Expand Down

0 comments on commit 2113148

Please sign in to comment.