git-release.sh 481 B

12345678910111213141516171819
  1. #!/usr/bin/env sh
  2. git checkout dev
  3. if test -n "$(git status --porcelain)"; then
  4. echo 'Unclean working tree. Commit or stash changes first.' >&2;
  5. exit 128;
  6. fi
  7. if ! git fetch --quiet 2>/dev/null; then
  8. echo 'There was a problem fetching your branch. Run `git fetch` to see more...' >&2;
  9. exit 128;
  10. fi
  11. if test "0" != "$(git rev-list --count --left-only @'{u}'...HEAD)"; then
  12. echo 'Remote history differ. Please pull changes.' >&2;
  13. exit 128;
  14. fi
  15. echo 'No conflicts.' >&2;