Initial pgterminate code
This commit is contained in:
parent
0487d635fc
commit
565c45a8fc
15 changed files with 697 additions and 0 deletions
16
build.sh
Executable file
16
build.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
BINARY=pgterminate
|
||||
VERSION=$(cat VERSION)
|
||||
BUILD_PATH=/tmp/${BINARY}-${VERSION}
|
||||
ldflags="-X main.AppVersion=${VERSION}"
|
||||
GOOS=linux
|
||||
GOARCH=amd64
|
||||
|
||||
export GOOS
|
||||
export GOARCH
|
||||
|
||||
go build -ldflags "$ldflags" -o ${BUILD_PATH}/${BINARY} cmd/${BINARY}/main.go
|
||||
(cd ${BUILD_PATH} && tar czf ${BINARY}-${VERSION}-${GOOS}-${GOARCH}.tar.gz ${BINARY})
|
||||
|
||||
echo "Archive created:"
|
||||
ls -l ${BUILD_PATH}/${BINARY}-${VERSION}-${GOOS}-${GOARCH}.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue