Skip to content

Commit ab6a085

Browse files
committed
Generate a .tar.gz artifact for homebrew
1 parent 5c578e3 commit ab6a085

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/build-all-platforms

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/bash
2+
if [ -z "$JP_VERSION" ]
3+
then
4+
echo "Must set JP_VERSION env var" 1>&2
5+
exit 1
6+
fi
27
go get ./...
38
rm -rf ./build/jp-*
49
for goos in darwin linux windows freebsd; do
@@ -15,3 +20,9 @@ export GOARCH=arm
1520
export GOARM=7
1621
echo "Building for $GOOS/$GOARCH/$GOARM"
1722
go build -v -o build/jp-$GOOS-$GOARCH-arm$GOARM 2> /dev/null
23+
# And finally we'll create a .tar.gz version for homebrew users.
24+
cp build/jp-darwin-amd64 build/jp
25+
cd build
26+
tar cvfz jp-$JP_VERSION.tar.gz jp
27+
rm jp
28+
cd ..

0 commit comments

Comments
 (0)