update-core.sh 858 B

1234567891011121314151617181920212223242526272829
  1. git submodule update --init --recursive
  2. cd deltachat-ios/libraries/deltachat-core-rust
  3. OLD=`git branch --show-current`
  4. if [ $# -eq 0 ]; then
  5. echo "updates deltachat-core-rust submodule to last commit of a branch."
  6. echo "usage: ./scripts/update-core.sh BRANCH_NAME"
  7. echo "current branch: $OLD"
  8. exit
  9. fi
  10. BRANCH=$1
  11. git fetch
  12. git checkout $BRANCH
  13. TEST=`git branch --show-current`
  14. if [ "$TEST" != "$BRANCH" ]; then
  15. echo "cannot select branch: $BRANCH"
  16. exit
  17. fi
  18. git pull
  19. commitmsg=`git log -1 --pretty=%s`
  20. cd ../../..
  21. git add deltachat-ios/libraries/deltachat-core-rust
  22. git commit -m "update deltachat-core-rust to '$commitmsg' of branch '$BRANCH'"
  23. echo "old branch: $OLD, new branch: $BRANCH"
  24. echo "changes are committed to local repo."
  25. echo "use 'git push' to use them or 'git reset HEAD~1; git submodule update --recursive' to abort."