diff --git a/scripts/make-dist.sh b/scripts/make-dist.sh index 014c26b..f4c08da 100755 --- a/scripts/make-dist.sh +++ b/scripts/make-dist.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -set -x +# set -x ARCHS="amd64 386" OSES="linux windows" @@ -15,23 +15,26 @@ for GOOS in $OSES; do for GOARCH in $ARCHS; do echo "Building for GOOS=$GOOS GOARCH=$GOARCH" GOOS=$GOOS GOARCH=$GOARCH go build -o dist/contentdb ./cmd/contentdb - zip dist/contentdb-$GOOS-$GOARCH.zip dist/contentdb README.md LICENSE + zip -q dist/contentdb-$GOOS-$GOARCH.zip dist/contentdb README.md LICENSE export FILES="$FILES dist/contentdb-$GOOS-$GOARCH.zip" rm -f dist/contentdb done done # Prepare a Github release -git tag --sort creatordate LAST=$(git tag --sort creatordate | tail -n 1) -read -p "Release version (latest is $LAST): " VERSION -CHANGES="$(mktemp)" -git log --pretty="* %an: %s" ${LAST}..HEAD > $CHANGES +read -p "New tag/version (latest is $LAST): " VERSION -echo "Releasing '$FILES' ..." +CHANGELOG="$(mktemp)" +echo "# Changelog" > $CHANGELOG +echo >> $CHANGELOG +git log --pretty="* %an: %s" ${LAST}..HEAD >> $CHANGELOG +cat $CHANGELOG +echo "Drafting a Github release (uploading $FILES) ..." gh release --repo ronoaldo/minetools create \ --draft \ - --notes-file $CHANGES \ + --title "minetools $VERSION" \ + --notes-file $CHANGELOG \ $VERSION \ $FILES \ No newline at end of file