mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
16 lines
550 B
Python
Executable File
16 lines
550 B
Python
Executable File
#!/bin/sh
|
|
|
|
VERSION="0.3.0"
|
|
HASH=`git log -n1 --pretty=format:%h`
|
|
REVERSION=`git log --oneline|wc -l|tr -d ' '`
|
|
BUILD_TIME=`date +'%Y-%m-%d %H:%M:%S'`
|
|
LDFLAGS="-X 'main._GIT_HASH=$HASH'
|
|
-X 'main._GIT_REVERSION=$REVERSION'
|
|
-X 'main._BUILD_TIME=$BUILD_TIME'
|
|
-X 'main._VERSION=$VERSION'"
|
|
|
|
go run contrib/bindata/main.go -pkg shell -o code/client/shell/assets.go \
|
|
-prefix html/shell "$@" html/shell/...
|
|
CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o bin/np-svr code/server/*.go
|
|
CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o bin/np-cli code/client/*.go
|