xca/release/git.release.something
Christian Hohnstaedt 957bdbaa72 Put release related files into an own sub-directory
git.release.something ->
   Create any git release with a tag to test package (debian/rpm) build

git.release -> Create required changes and tags for the next release
git.publish -> Finalize the release (github release)
gen-binary-hash / binary-hashes.json -> keep track of release hashes
2021-05-09 12:22:53 +02:00

40 lines
708 B
Bash
Executable File

#!/bin/sh
set -e
type git || exit 1
export TVERSION="$1"
commit=master
test -z "$2" || commit="$2"
if test -z "$TVERSION"; then
echo "usage: $0 <VERSION> [commit]"
echo " if commit is ommitted, 'master' is used"
exit 1
fi
if ! git diff-index --quiet HEAD --; then
echo "You have local changes, please commit, reset or stash them"
exit 1
fi
branchname="build-$TVERSION"
git checkout -b "$branchname" "$commit"
echo "$TVERSION" > VERSION
git commit VERSION -m "$TVERSION"
git tag RELEASE.$TVERSION
# Create the tar.gz
make dist
# Return to master
git checkout master
# Cleanup
# Delete temporary branch
git branch -D "$branchname"
# Delete the temporary tag
git tag -d RELEASE.$TVERSION