Skip to content

Commit

Permalink
Fixed bug with the version that crashes the docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
dub-flow committed Mar 27, 2023
1 parent 6f3edaf commit cb74376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
5 changes: 5 additions & 0 deletions create-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ else
if [ $1 = "docker" ]; then
go build -ldflags="$FLAGS" -trimpath -o veracode-js-packager
fi

# check if `./create-releases.sh local` is ran which means we only compile for the architecture of the current machine
if [ $1 = "local" ]; then
go build -ldflags="$FLAGS" -trimpath -o veracode-js-packager
fi
fi
13 changes: 1 addition & 12 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import (
"fmt"
"io"
"net/http"
"os"

"github.com/fatih/color"
"github.com/hashicorp/go-version"
)

var AppVersion string = getCurrentAppVersion()

var currentVersionFile string = "./current_version"
var AppVersion string = "0.0.0"
var latestRelease string = "https://github.com/fw10/veracode-javascript-packager/releases/latest"

func notifyOfUpdates() {
Expand Down Expand Up @@ -62,11 +59,3 @@ func notifyOfUpdates() {
}
}

func getCurrentAppVersion() string {
currentVersion, err := os.ReadFile(currentVersionFile)
if err != nil {
fmt.Print(err)
}

return string(currentVersion)
}

0 comments on commit cb74376

Please sign in to comment.