Skip to content

Commit

Permalink
add justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed May 13, 2022
1 parent 90c1fd9 commit 77a1b0f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
publish_all:
flutter pub publish --force --server=https://pub.dartlang.org

release old_version new_version:
grep -q 'version: {{old_version}}' pubspec.yaml
grep -q '{{new_version}}' CHANGELOG.md

sed -i '' 's/version: {{old_version}}/version: {{new_version}}/g' pubspec.yaml

git add --all
git status && git diff --staged | grep ''
git commit -m "bump from {{old_version}} to {{new_version}}"
git push

awk '/## {{new_version}}/{flag=1; next} /## {{old_version}}/{flag=0} flag' CHANGELOG.md | gh release create v{{new_version}} --notes-file "-" --draft --title v{{new_version}}
echo 'A *DRAFT* release has been created. Please go to the webpage and really release if you find it correct.'
open https://github.com/fzyzcjy/flutter_portal/releases

just publish_all

0 comments on commit 77a1b0f

Please sign in to comment.