Skip to content

Commit

Permalink
#9 make it a bit more generic the hacky release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Corso committed Jun 6, 2018
1 parent 63626e6 commit 447769d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

set -e

rm -rf "bin/sachet-$VERSION.linux-amd64"
mkdir "bin/sachet-$VERSION.linux-amd64"
env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o "bin/sachet-$VERSION.linux-amd64/sachet" github.com/messagebird/sachet/cmd/sachet
cd bin
tar -zcvf "sachet-$VERSION.linux-amd64.tar.gz" "sachet-$VERSION.linux-amd64"
# github user and repo
USER=messagebird
REPO=sachet

GITHUB_USER=messagebird
GITHUB_REPO=sachet
rm -rf "bin/$REPO-$VERSION.linux-amd64"
mkdir "bin/$REPO-$VERSION.linux-amd64"
env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o "bin/sachet-$VERSION.linux-amd64/$REPO" github.com/$USER/$REPO/cmd/$REPO
cd bin
tar -zcvf "$REPO-$VERSION.linux-amd64.tar.gz" "$REPO-$VERSION.linux-amd64"

# go get -u github.com/aktau/github-release
# dont forget to set your token like
Expand All @@ -30,7 +31,7 @@ github-release upload \
--user $GITHUB_USER \
--repo $GITHUB_REPO \
--tag $VERSION \
--name "sachet-$VERSION.linux-amd64.tar.gz" \
--file "sachet-$VERSION.linux-amd64.tar.gz"
--name "$REPO-$VERSION.linux-amd64.tar.gz" \
--file "$REPO-$VERSION.linux-amd64.tar.gz"


0 comments on commit 447769d

Please sign in to comment.