mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
11 lines
426 B
Bash
11 lines
426 B
Bash
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
|
|
GIT_COMMIT=`git rev-parse --short HEAD`
|
|
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
|
GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"`
|
|
|
|
go build -o bin/neko -ldflags "-s -X 'demodesk/neko.buildDate=${BUILD_TIME}' -X 'demodesk/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}' -X 'demodesk/neko.gitBranch=${GIT_BRANCH}'" -i cmd/neko/main.go
|