mirror of
https://github.com/walles/moar.git
synced 2024-09-21 17:08:34 +03:00
0ccbd6a2b3
Our git commit messages have been screwed up by VSCode 1.40.1, probably in conjunction with using Git in Swedish. diff --git release.sh release.sh index 1cc1f6c..1b6805c 100755 --- release.sh +++ release.sh @@ -30,7 +30,7 @@ echo # FIXME: Make this part of the editable tagging message echo "Changes since last release:" -git log --first-parent --pretty="format:* %s" "$LAST_VERSION"..HEAD | cat +git log --first-parent --pretty="format:* %s" "$LAST_VERSION"..HEAD | sed 's/ diff.*//' echo echo Change-Id: Iedaecf17a69c8cfe22f29714907e599ff2b86689
55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e -o pipefail
|
|
|
|
echo "Running tests before making the release..."
|
|
./test.sh
|
|
|
|
# Bail if we're on a dirty version
|
|
if [ -n "$(git diff --stat)" ]; then
|
|
echo "ERROR: Please commit all changes before doing a release"
|
|
echo
|
|
git status
|
|
|
|
exit 1
|
|
fi
|
|
|
|
# List existing version numbers...
|
|
echo
|
|
echo "Previous version numbers:"
|
|
git tag | cat
|
|
|
|
# ... and ask for a new version number.
|
|
echo
|
|
echo "Please provide a version number for the new release:"
|
|
read -r VERSION
|
|
|
|
# List changes since last release as inspiration...
|
|
LAST_VERSION="$(git describe --abbrev=0)"
|
|
echo
|
|
|
|
# FIXME: Make this part of the editable tagging message
|
|
echo "Changes since last release:"
|
|
git log --first-parent --pretty="format:* %s" "$LAST_VERSION"..HEAD | sed 's/ diff.*//'
|
|
echo
|
|
echo
|
|
|
|
# Make an annotated tag for this release
|
|
git tag --annotate "$VERSION"
|
|
|
|
# NOTE: To get the version number right, these builds must
|
|
# be done after the above tagging.
|
|
#
|
|
# NOTE: Make sure this list matches the one in test.sh
|
|
GOOS=linux GOARCH=386 ./build.sh
|
|
GOOS=darwin GOARCH=amd64 ./build.sh
|
|
|
|
# Push the newly built release tag
|
|
git push --tags
|
|
|
|
# FIXME: Instead of asking the user to upload the binaries,
|
|
# upload them for the user.
|
|
echo
|
|
echo "Please upload the following binaries to <https://github.com/walles/moar/releases/tag/$VERSION>:"
|
|
file moar-"$VERSION"-*-*
|