release-ckeditor5.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. # For licensing, see LICENSE.md.
  4. set -e
  5. read -p "Did you update the \"Releases\" section in README.md? " -n 1 -r
  6. echo ""
  7. if [[ $REPLY =~ ^[Yy]$ ]]
  8. then
  9. # Release the CKEditor5 repository.
  10. node ./scripts/release/release-ckeditor5.js
  11. # Update the `stable` branch in the ckeditor5 repository.
  12. git checkout stable && git merge master && git checkout master
  13. # Add `stable` branches in all repos which don't have them yet.
  14. mgit exec 'git checkout -b stable 2> /dev/null && git push origin stable && git checkout master'
  15. # Update all `stable` branches in all packages.
  16. mgit exec 'git checkout stable && git pull origin stable && git merge master && git checkout master'
  17. # Make sure that `mgit.json` for `stable` and `master` branches is correct.
  18. # `stable` branch.
  19. git checkout stable && \
  20. node ./scripts/release/update-mgit-branches stable && \
  21. git commit -a -m "Internal: Use stable branches. [skip ci]".
  22. # `master` branch.
  23. git checkout master && \
  24. git merge stable && \
  25. node ./scripts/release/update-mgit-branches master && \
  26. git commit -a -m "Internal: Use master branches. [skip ci]"
  27. # Push the `stable` branches.
  28. git push origin stable master && \
  29. mgit exec 'git push origin stable'
  30. echo "Success! 🎂"
  31. else
  32. echo "Update the \"Releases\" section in README.md before starting the release process."
  33. fi