Skip to content

Commit cb74376

Browse files
committed
Fixed bug with the version that crashes the docker build
1 parent 6f3edaf commit cb74376

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

create-releases.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ else
3030
if [ $1 = "docker" ]; then
3131
go build -ldflags="$FLAGS" -trimpath -o veracode-js-packager
3232
fi
33+
34+
# check if `./create-releases.sh local` is ran which means we only compile for the architecture of the current machine
35+
if [ $1 = "local" ]; then
36+
go build -ldflags="$FLAGS" -trimpath -o veracode-js-packager
37+
fi
3338
fi

version.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ import (
55
"fmt"
66
"io"
77
"net/http"
8-
"os"
98

109
"github.com/fatih/color"
1110
"github.com/hashicorp/go-version"
1211
)
1312

14-
var AppVersion string = getCurrentAppVersion()
15-
16-
var currentVersionFile string = "./current_version"
13+
var AppVersion string = "0.0.0"
1714
var latestRelease string = "https://github.com/fw10/veracode-javascript-packager/releases/latest"
1815

1916
func notifyOfUpdates() {
@@ -62,11 +59,3 @@ func notifyOfUpdates() {
6259
}
6360
}
6461

65-
func getCurrentAppVersion() string {
66-
currentVersion, err := os.ReadFile(currentVersionFile)
67-
if err != nil {
68-
fmt.Print(err)
69-
}
70-
71-
return string(currentVersion)
72-
}

0 commit comments

Comments
 (0)