Skip to content
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