Skip to content

Commit 0601661

Browse files
committed
feat: add build script to generate git tag version for binary
1 parent 264e055 commit 0601661

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# Build script that injects version from git tag
3+
VERSION=$(git describe --tags --always)
4+
go build -ldflags "-s -w -X github.com/museslabs/kyma/cmd.version=$VERSION" -o kyma main.go
5+
6+
echo "Binary: ./kyma"

0 commit comments

Comments
 (0)