Skip to content

Commit

Permalink
* release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
adamansky committed Apr 16, 2024
1 parent 110af7e commit 8c21465
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,35 @@ readme() {
echo -e '\n```\n' >> "./README.md"
}

release_tag() {
echo "Creating EJDB2 release"
readme

git pull origin master
dch --distribution testing --no-force-save-on-release --release "" -c ./Changelog
VERSION=`dpkg-parsechangelog -l./Changelog -SVersion`
TAG="v${VERSION}"
CHANGESET=`dpkg-parsechangelog -l./Changelog -SChanges | sed '/^iwnet.*/d' | sed '/^\s*$/d'`
git add ./Changelog
git add ./README.md

if ! git diff-index --quiet HEAD --; then
git commit -a -m"${TAG} landed"
git push origin master
fi

echo "${CHANGESET}" | git tag -f -a -F - "${TAG}"
git push origin -f --tags
}

while [ "$1" != "" ]; do
case $1 in
"-d" ) readme
exit
;;
"-r" ) release_tag
exit
;;
esac
shift
done

0 comments on commit 8c21465

Please sign in to comment.