Skip to content

Commit

Permalink
Add release script for bash
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3rndt committed Sep 12, 2023
1 parent 47b84b1 commit 1e798aa
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
if ! [[ -z $1 ]]; then
explicit_version=true;
if [ "$1" = "major" ]; then
explicit_version=false; fi
if [ "$1" = "minor" ]; then
explicit_version=false; fi
if [ "$1" = "patch" ]; then
explicit_version=false; fi
if [ "$explicit_version" = "true" ]; then
cider version $1;
else
cider bump $1;
fi
flutter pub get;

new_version=$(cider version);

echo "New version: $new_version";
echo "Changes to release:";
cider describe;
cider release;
git commit pubspec.yaml CHANGELOG.md example/pubspec.lock -m "Version $new_version";
git tag -a v$new_version -m "Version $new_version";
git push;
git push --tags;
exit 0;
else
echo "Usage: $0 version number or major, minor, patch";
exit 1;
fi

0 comments on commit 1e798aa

Please sign in to comment.