Files
FEX-Emu--FEX/Scripts/generate_release.sh
T
Ryan Houdek 26d9ddef9f Updates release script to match what I want it to be
Generates the current and previous tag automatically.
Checks to ensure the previous tag exists and that the current tag does not
2021-04-02 11:49:19 -07:00

30 lines
790 B
Bash
Executable File

#!/bin/env bash
PREVIOUS=FEX-$(date --date='-1 month' +%y%m)
CURRENT=FEX-$(date +%y%m)
if ! git rev-list $PREVIOUS > /dev/null 2>&1 ;
then
echo "$PREVIOUS tag doesn't exist"
exit
fi
if git rev-list $CURRENT > /dev/null 2>&1 ;
then
echo "$CURRENT tag already exists!"
exit
fi
echo "Tagging $CURRENT, previous release $PREVIOUS"
echo "Press cltr-c to cancel within 10 seconds"
sleep 10
git tag $CURRENT -a -m "temporary"
Scripts/generate_doc_outline.sh > docs/SourceOutline.md
git commit docs/SourceOutline.md -m "Docs: Update for release $CURRENT"
git tag -d $CURRENT
git tag $CURRENT -a -m "$(Scripts/generate_changelog.sh $PREVIOUS $CURRENT)" --edit
echo "Inspect if everything went smoothly via 'git log -6 $CURRENT' "
echo "if all is good, do 'git push upstream $CURRENT'"