update-stable-branches.sh 842 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. # For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. set -e
  5. read -p "Are you sure? " -n 1 -r
  6. echo ""
  7. if [[ $REPLY =~ ^[Yy]$ ]]
  8. then
  9. # Update the `stable` branch in the `ckeditor5` repository.
  10. git checkout stable && git merge master && git checkout master
  11. # Add `#stable` branches in all repos which don't have them yet.
  12. mrgit exec 'git checkout -b stable 2> /dev/null && git push origin stable && git checkout master'
  13. # Update all `#stable` branches in all packages.
  14. mrgit exec 'git checkout stable && git pull origin stable && git merge master && git checkout master'
  15. # Push the `#stable` branches.
  16. git push origin stable master && \
  17. mrgit exec 'git push origin stable'
  18. echo "Success! 🎂"
  19. fi