This commit is contained in:
Pavel Vorobyov
2019-10-08 13:38:55 +03:00
parent 83e0329210
commit f13072cc03
4 changed files with 39 additions and 1 deletions

14
build.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
kname=`uname -s`
kver=`uname -r`
karch=`uname -m`
gitcommit=`git rev-list --tags --max-count=1`
appver=`git describe --tags $gitcommit`
appbuild=`git rev-list ${appver}.. --count`
importroot="github.com/viert/xc/cli"
go build -o xc \
-ldflags="-X $importroot.appVersion=$appver -X $importroot.appBuild=$appbuild -X $importroot.kernelName=$kname -X $importroot.kernelVersion=$kver -X $importroot.kernelArch=$karch" \
cmd/xc/main.go