Build with a predictable name

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2024-11-13 09:19:58 +02:00
parent 0b5aef41ee
commit 2f7c72b0a7

View File

@ -13,7 +13,7 @@ env:
steps:
- |
PACKAGE_VERSION=${PACKAGE_VERSION%\-*} && \
cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -ldflags="-w -s -X main.version=v$PACKAGE_VERSION" && mv {{.Values.name}} /usr/bin/
cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -ldflags="-w -s -X main.version=v$PACKAGE_VERSION" -o {{.Values.name}} && mv {{.Values.name}} /usr/bin/
- upx -1 /usr/bin/{{.Values.name}}