Skip to content

Commit

Permalink
App version was broken due to casing due to recent code improvement r…
Browse files Browse the repository at this point in the history
…efactor
  • Loading branch information
antfie committed Mar 1, 2024
1 parent dbc77c2 commit 58bfad5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func main() {
fmt.Printf("Scan Health v%s\nCopyright © Veracode, Inc. 2023. All Rights Reserved.\nThis is an unofficial Veracode product. It does not come with any support or warranty.\n\n", appVersion)
fmt.Printf("Scan Health v%s\nCopyright © Veracode, Inc. 2024. All Rights Reserved.\nThis is an unofficial Veracode product. It does not come with any support or warranty.\n\n", AppVersion)
vid := flag.String("vid", "", "Veracode API ID - See https://docs.veracode.com/r/c_api_credentials3")
vkey := flag.String("vkey", "", "Veracode API key - See https://docs.veracode.com/r/c_api_credentials3")
profile := flag.String("profile", "default", "Veracode credential profile (default is \"default\") - See https://docs.veracode.com/r/c_httpie_tool#using-multiple-profiles")
Expand Down Expand Up @@ -52,7 +52,7 @@ func main() {
notifyOfUpdates()

apiId, apiKey := getCredentials(*vid, *vkey, *profile)
api := data.API{Id: apiId, Key: apiKey, Region: regionToUse, AppVersion: appVersion, EnableCaching: *enableCaching}
api := data.API{Id: apiId, Key: apiKey, Region: regionToUse, AppVersion: AppVersion, EnableCaching: *enableCaching}

api.AssertCredentialsWork()

Expand Down
4 changes: 2 additions & 2 deletions sast_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func performSASTCompare(scanA, scanB *string, api data.API, regionToUse string,

wg.Add(2)

scanAReport := report.NewReport(scanABuildId, regionToUse, appVersion, false)
scanBReport := report.NewReport(scanBBuildId, regionToUse, appVersion, false)
scanAReport := report.NewReport(scanABuildId, regionToUse, AppVersion, false)
scanBReport := report.NewReport(scanBBuildId, regionToUse, AppVersion, false)

go func() {
defer wg.Done()
Expand Down
4 changes: 2 additions & 2 deletions sast_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func performSASTHealthCheck(scan *string, api data.API, regionToUse string, incl
buildId,
regionToUse))

healthReport := report.NewReport(buildId, regionToUse, appVersion, false)
healthReport := report.NewReport(buildId, regionToUse, AppVersion, false)
api.PopulateReportWithDataFromAPI(healthReport, *includePreviousScan)

if !healthReport.Scan.IsLatestScan {
Expand All @@ -37,7 +37,7 @@ func performSASTHealthCheck(scan *string, api data.API, regionToUse string, incl
previousBuildId := api.GetPreviousBuildId(healthReport)

if previousBuildId > 0 {
previousHealthReport = report.NewReport(previousBuildId, regionToUse, appVersion, true)
previousHealthReport = report.NewReport(previousBuildId, regionToUse, AppVersion, true)
api.PopulateReportWithDataFromAPI(previousHealthReport, false)
}
}
Expand Down
4 changes: 2 additions & 2 deletions version_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/fatih/color"
)

var appVersion = "0.0"
var AppVersion = "0.0"

func notifyOfUpdates() {
client := &http.Client{}
Expand Down Expand Up @@ -52,7 +52,7 @@ func notifyOfUpdates() {
return
}

appVersion, err := utils.StringToFloat(appVersion)
appVersion, err := utils.StringToFloat(AppVersion)

if err != nil {
return
Expand Down

0 comments on commit 58bfad5

Please sign in to comment.