Add script to package binaries
This commit is contained in:
parent
18b0260d1f
commit
a65cca44e5
6
Makefile
6
Makefile
@ -40,11 +40,15 @@ build: assets
|
|||||||
@echo "You can now execute ./pgweb"
|
@echo "You can now execute ./pgweb"
|
||||||
|
|
||||||
release: assets
|
release: assets
|
||||||
gox \
|
@echo "Building binaries..."
|
||||||
|
@gox \
|
||||||
-osarch="$(TARGETS)" \
|
-osarch="$(TARGETS)" \
|
||||||
-ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit $(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime $(BUILD_TIME)" \
|
-ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit $(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime $(BUILD_TIME)" \
|
||||||
-output="./bin/pgweb_{{.OS}}_{{.Arch}}"
|
-output="./bin/pgweb_{{.OS}}_{{.Arch}}"
|
||||||
|
|
||||||
|
@echo "\nPackaging binaries...\n"
|
||||||
|
@./script/package.sh
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
gox -build-toolchain
|
gox -build-toolchain
|
||||||
|
|
||||||
|
14
script/package.sh
Executable file
14
script/package.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIR="./bin"
|
||||||
|
rm $DIR/*.zip
|
||||||
|
|
||||||
|
for file in $(ls $DIR)
|
||||||
|
do
|
||||||
|
fin=$DIR/$file
|
||||||
|
fout=$DIR/$file.zip
|
||||||
|
shasum -a 256 $fin
|
||||||
|
zip -9 -q $fout $fin
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user