forked from BilalShahid13/PersistentBottomNavBar
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathrelease.sh
executable file
·31 lines (29 loc) · 822 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
dart pub publish;
exit 0;
else
echo "Usage: $0 version number or major, minor, patch";
exit 1;
fi