neko/server/build
2020-01-26 10:43:08 +00:00

9 lines
420 B
Bash
Executable File

#!/bin/bash
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 'n.eko.moe/neko.buildDate=${BUILD_TIME}' -X 'n.eko.moe/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}' -X 'n.eko.moe/neko.gitBranch=${GIT_BRANCH}'" -i cmd/neko/main.go