Skip to content

release.sh: generate releae tarball #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ else
VERSION=$1
fi
echo Releasing $VERSION
TARF=whatscli-${VERSION#v}.tar.gz
WINF=whatscli-$VERSION-windows.zip
LINUXF=whatscli-$VERSION-linux.zip
MACF=whatscli-$VERSION-macos.zip
RASPIF=whatscli-$VERSION-raspberrypi.zip

# create release tarball
go mod vendor
tar czf $TARF --transform "s,^,whatscli-${VERSION#v}/," *

# build zip files with binaries
GOOS=darwin go build -o whatscli
zip $MACF whatscli
Expand All @@ -31,7 +36,7 @@ git pull
LASTTAG=$(git describe --tags --abbrev=0)
git log $LASTTAG..HEAD --no-decorate --pretty=format:"- %s" --abbrev-commit > changes.txt
vim changes.txt
gh release create $VERSION $LINUXF $MACF $WINF $RASPIF -F changes.txt -t $VERSION
gh release create $VERSION $TARF $LINUXF $MACF $WINF $RASPIF -F changes.txt -t $VERSION
rm changes.txt
rm *.zip

Expand Down