diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..0023f9ae6 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,41 @@ +# `chectl` release process + +#### Make release changes and push them to your personal fork + +```bash +CHE_VERSION="7.7.0" && \ +BRANCH_NAME="7.7.x" && \ +FORK="l0rd/chectl" && \ +./make-release.sh ${CHE_VERSION} ${BRANCH_NAME} ${FORK} +``` + +#### Create a PR using `hub` + +[hub](https://hub.github.com/) is an extension to command-line git that helps you do everyday GitHub tasks without ever leaving the terminal. + +```bash +GH_USER="l0rd" && \ +RELEASE_ISSUE_LINK="https://github.com/eclipse/che/issues/15504" && \ +hub pull-request --browse \ + --base che-incubator:${BRANCH_NAME} \ + --head ${GH_USER}:${BRANCH_NAME} \ + -m "chore(release): release version ${CHE_VERSION}" \ + -m "### What does this PR do?" \ + -m "Release version ${CHE_VERSION}" \ + -m "### What issues does this PR fix or reference?" \ + -m "${RELEASE_ISSUE_LINK}" +``` + +Wait for a review approval and then merge it. + +#### Release + +1. Delete the old chectl **release** branch from GitHub if it exist ([manually](https://github.com/che-incubator/chectl/branches)) +2. Push to **release** branch: + + ```bash + GIT_REMOTE_UPSTREAM=git@github.com:che-incubator/chectl.git && \ + git push ${GIT_REMOTE_UPSTREAM} ${BRANCH_NAME}:release + ``` + +3. Track [TravisCI Job](https://travis-ci.org/che-incubator/chectl/branches) diff --git a/make-release.sh b/make-release.sh index a268669a6..9ed018b0d 100755 --- a/make-release.sh +++ b/make-release.sh @@ -19,8 +19,8 @@ init() { } check() { - if [ $# -ne 2 ]; then - printf "%bError: %bWrong number of parameters.\nUsage: ./make-release.sh \n" "${RED}" "${NC}" + if [ $# -ne 3 ]; then + printf "%bError: %bWrong number of parameters.\nUsage: ./make-release.sh \n" "${RED}" "${NC}" exit 1 fi } @@ -38,14 +38,15 @@ run() { VERSION=$1 BRANCH_NAME=$2 - GIT_REMOTE_UPSTREAM=upstream - GIT_REMOTE_FORK=origin + FORK=$3 + GIT_REMOTE_UPSTREAM="git@github.com:che-incubator/chectl.git" + GIT_REMOTE_FORK="git@github.com:${FORK}.git" git checkout master # reset local changes while true; do - read -r -p "It will reset any local changes to the current branch ?" yn + read -r -p "It will reset any local changes to the current branch? " yn case $yn in [Yy]* ) break;; [Nn]* ) exit;;