mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
9 lines
420 B
Bash
Executable File
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
|