This commit is contained in:
parent
767b1e8a7c
commit
3ae9f2afa2
@ -23,4 +23,4 @@ jobs:
|
|||||||
&& go version
|
&& go version
|
||||||
- name: Linux Build
|
- name: Linux Build
|
||||||
run:
|
run:
|
||||||
./build.sh
|
./ci-build.sh
|
||||||
|
22
ci-build.sh
Executable file
22
ci-build.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
GO = $(which go)
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
|
||||||
|
GIT_COMMIT=$(git rev-list -1 HEAD)
|
||||||
|
export GIT_COMMIT
|
||||||
|
CANONICAL_VERSION=$(cat ./VERSION)-$(uname)
|
||||||
|
export CANONICAL_VERSION
|
||||||
|
VERSION_STRING="$CANONICAL_VERSION-$GIT_COMMIT"
|
||||||
|
export VERSION_STRING
|
||||||
|
|
||||||
|
buildpath="build/$(uname)/gostations"
|
||||||
|
|
||||||
|
${GO} mod vendor
|
||||||
|
${GO} mod tidy
|
||||||
|
|
||||||
|
${GO} build -o "$buildpath" -ldflags "-X main.version=$VERSION_STRING"
|
||||||
|
|
||||||
|
"$buildpath" -v
|
||||||
|
|
Loading…
Reference in New Issue
Block a user