Skip to content

Commit

Permalink
chore(release): update release script and add RELEASE.md (#443)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
  • Loading branch information
l0rd authored Jan 8, 2020
1 parent 6892549 commit aa4f9e9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
41 changes: 41 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 6 additions & 5 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ init() {
}

check() {
if [ $# -ne 2 ]; then
printf "%bError: %bWrong number of parameters.\nUsage: ./make-release.sh <version> <branch>\n" "${RED}" "${NC}"
if [ $# -ne 3 ]; then
printf "%bError: %bWrong number of parameters.\nUsage: ./make-release.sh <version> <branch> <fork>\n" "${RED}" "${NC}"
exit 1
fi
}
Expand All @@ -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;;
Expand Down

0 comments on commit aa4f9e9

Please sign in to comment.