Skip to content

Commit

Permalink
Update magefile.go
Browse files Browse the repository at this point in the history
Co-authored-by: Craig MacKenzie <[email protected]>
  • Loading branch information
dwhyrock and cmacknz authored Jun 20, 2024
1 parent 36c2fac commit 5f11a2b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -993,18 +993,18 @@ func packageAgent(platforms []string, dependenciesVersion string, agentPackaging
// to other functions that need to operate on the manifest
if manifestResponse, err = manifest.DownloadManifest(devtools.ManifestURL); err != nil {
log.Panicf("failed to download remote manifest file %s", err)
}

if parsedVersion, err := version.ParseVersion(manifestResponse.Version); err != nil {
log.Panicf("the manifest version from manifest is not semver, got %s", manifestResponse.Version)
} else {
if parsedVersion, err := version.ParseVersion(manifestResponse.Version); err != nil {
log.Panicf("the manifest version from manifest is not semver, got %s", manifestResponse.Version)
} else {
// When getting the packageVersion from snapshot we should also update the env of SNAPSHOT=true which is
// something that we use as an implicit parameter to various functions
if parsedVersion.IsSnapshot() {
os.Setenv(snapshotEnv, "true")
mage.Snapshot = true
}
os.Setenv("BEAT_VERSION", parsedVersion.CoreVersion())
// When getting the packageVersion from snapshot we should also update the env of SNAPSHOT=true which is
// something that we use as an implicit parameter to various functions
if parsedVersion.IsSnapshot() {
os.Setenv(snapshotEnv, "true")
mage.Snapshot = true
}
os.Setenv("BEAT_VERSION", parsedVersion.CoreVersion())
}
}

Expand Down

0 comments on commit 5f11a2b

Please sign in to comment.