Skip to content

Commit

Permalink
Fix Konflux build platform arch
Browse files Browse the repository at this point in the history
The GOOS and GOARCH env vars need to be set explicitly, otherwise we
just build the linux x86 binary over and over. Looks like this
regression was introduced in commit b8db99c.

I think restoring the export on those two vars would also have
worked.

Ref: https://issues.redhat.com/browse/SECURESIGN-1054
  • Loading branch information
simonbaird committed Jun 13, 2024
1 parent 9f89d87 commit d62ea87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for os_arch in ${BUILDS}; do
[[ "$GOOS" == "windows" ]] && DOT_EXE=".exe" || DOT_EXE=""
BINFILE="ec_${GOOS}_${GOARCH}${DOT_EXE}"
echo "Building ${BINFILE} for ${EC_FULL_VERSION}"
go build \
GOOS="${GOOS}" GOARCH="${GOARCH}" go build \
-trimpath \
--mod=readonly \
-ldflags="-s -w -X github.com/enterprise-contract/ec-cli/internal/version.Version=${EC_FULL_VERSION}" \
Expand Down

0 comments on commit d62ea87

Please sign in to comment.