release_changelog.sh 557 B

12345678910111213141516171819
  1. #!/bin/bash
  2. RELEASE_VERSION=$1
  3. RELEASE_DATE=$2
  4. #Get linode/manager repo name from remote branches
  5. GET_ORIGIN=$(git remote -v | grep git@github.com:linode/manager.git)
  6. if [[ -z $GET_ORIGIN ]]; then
  7. GET_ORIGIN=$(git remote -v | grep https://github.com/linode/manager)
  8. fi
  9. set -- $GET_ORIGIN
  10. ORIGIN=$1
  11. #Clean working tree
  12. git reset --hard
  13. #Create release branch
  14. git fetch $ORIGIN
  15. git checkout develop
  16. git rebase $ORIGIN/develop
  17. git checkout -b release-$RELEASE_VERSION
  18. #Generate changelog
  19. python generate_changelog.py $RELEASE_VERSION $RELEASE_DATE $ORIGIN