Archived
2
0

changed build script

This commit is contained in:
Craig 2020-01-20 14:37:32 +00:00
parent a1b5bebacc
commit 81abb88317
2 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
cd ../server cd ../server
go get && make build go get && ./build
cd ../client cd ../client
npm install && npm run build npm install && npm run build

7
server/Makefile → server/build Normal file → Executable file
View File

@ -1,9 +1,8 @@
#!/bin/bash
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'` BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
GIT_COMMIT=`git rev-parse --short HEAD` GIT_COMMIT=`git rev-parse --short HEAD`
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD` GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"` GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"`
LDFLAGS=-ldflags "-s -X version.buildTime=${BUILD_TIME} -X version.gitRevision=${GIT_DIRTY}${GIT_REVISION} -X version.gitBranch=${GIT_BRANCH}" go build -o bin/neko -ldflags "-s -X version.buildTime=${BUILD_TIME} -X version.gitRevision=${GIT_DIRTY}${GIT_REVISION} -X version.gitBranch=${GIT_BRANCH}" -i cmd/neko/main.go
build:
go build -o bin/neko ${LDFLAGS} -i cmd/neko/main.go