release-ckeditor5.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. # Update version of CKEditor 5 dependencies in package.json
  10. node ./scripts/release/update-dependencies-versions.js
  11. # Release the CKEditor5 repository.
  12. node ./scripts/release/release-ckeditor5.js
  13. # Update the `stable` branch in the ckeditor5 repository.
  14. git checkout stable && git merge master && git checkout master
  15. # Add `stable` branches in all repos which don't have them yet.
  16. mgit exec 'git checkout -b stable 2> /dev/null && git push origin stable && git checkout master'
  17. # Update all `stable` branches in all packages.
  18. mgit exec 'git checkout stable && git merge master && git checkout master'
  19. # Make sure that `mgit.json` for `stable` and `master` branches is correct.
  20. # `stable` branch.
  21. git checkout stable && \
  22. node ./scripts/release/update-mgit-branches stable && \
  23. git commit -a -m "Internal: Use stable branches. [skip ci]".
  24. # `master` branch.
  25. git checkout master && \
  26. git merge stable && \
  27. node ./scripts/release/update-mgit-branches master && \
  28. git commit -a -m "Internal: Use master branches. [skip ci]"
  29. # Push the `stable` branches.
  30. git push origin stable master && \
  31. mgit exec 'git push origin stable'
  32. echo "Success! 🎂"
  33. else
  34. echo "Update the \"Releases\" section in README.md before starting the release process."
  35. fi