Skip to content

Commit

Permalink
fix liqoctl build ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aleoli authored and adamjensenbot committed Dec 22, 2023
1 parent 2d2662e commit b7e03bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build/liqoctl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ trap 'error "${BASH_SOURCE}" "${LINENO}"' ERR

GO_VERSION="1.21"

docker run -v "$PWD:/liqo" -w /liqo -e="CGO_ENABLED=${CGO_ENABLED}" --rm "golang:${GO_VERSION}" \
CGO_ENABLED="${CGO_ENABLED:-0}"
GOOS="${GOOS:-linux}"
GOARCH="${GOARCH:-amd64}"
LIQOCTLVERSION="${LIQOCTLVERSION:-dev}"

docker run -v "$PWD:/liqo" -w /liqo -e="CGO_ENABLED=${CGO_ENABLED}" \
-e "GOOS=${GOOS}" -e "GOARCH=${GOARCH}" \
-e "LIQOCTLVERSION=${LIQOCTLVERSION}" \
--rm "golang:${GO_VERSION}" \
sh -c "go mod tidy && go build -o \"./liqoctl-${GOOS}-${GOARCH}\" \
-ldflags=\"-s -w -X 'github.com/liqotech/liqo/pkg/liqoctl/version.liqoctlVersion=${LIQOCTLVERSION}'\" \
-buildvcs=false \
Expand Down

0 comments on commit b7e03bd

Please sign in to comment.