From a03f53961ed0021fd293ee5f66bd3315e809fe27 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Tue, 12 Sep 2023 16:05:47 +0300 Subject: [PATCH] change snapshot to next for dev versioning Signed-off-by: Mykhailo Kuznietsov --- .github/workflows/typescript-publish.yml | 4 ++-- VERSION | 2 +- make-release.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/typescript-publish.yml b/.github/workflows/typescript-publish.yml index 63bc85f7f905..15c5e9ec1779 100644 --- a/.github/workflows/typescript-publish.yml +++ b/.github/workflows/typescript-publish.yml @@ -48,8 +48,8 @@ jobs: npm ci && npm run tsc SHORT_SHA1=$(git rev-parse --short=7 HEAD) - CURRENT_VERSION=$(sed -r 's/(.*)-SNAPSHOT/\1/' ../../VERSION) - NEW_VERSION="${CURRENT_VERSION}-dev-${SHORT_SHA1}" + CURRENT_VERSION=$(sed -r 's/(.*)-next/\1/' ../../VERSION) + NEW_VERSION="${CURRENT_VERSION}-next-${SHORT_SHA1}" sed -i -r -e "s/(\"version\": )(\".*\")/\1\"$NEW_VERSION\"/" package.json npm publish --tag $DIST_TAG diff --git a/VERSION b/VERSION index cf55e06a6a41..48f0a47150e1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.75.0-SNAPSHOT +7.75.0-next diff --git a/make-release.sh b/make-release.sh index 913af522585f..c2e79d741d75 100755 --- a/make-release.sh +++ b/make-release.sh @@ -39,7 +39,7 @@ update_issue_template() { local -r templateFile=$2 # take only two first digits of the version that we will release - # will get 7.35 from input 7.35.0-SNAPSHOT + # will get 7.74 from input 7.74.0-next local -r versionXY=$(echo "${currentReleaseVersion}" | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p') # now extract the current latest version specified in the issue template @@ -76,9 +76,11 @@ bump_version () { pushd tests/e2e >/dev/null || exit npm --no-git-tag-version version --allow-same-version "${NEXT_VERSION}" - # update devworkspace generator version - jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${NEXT_VERSION}\"" package.json > package.json.update - mv package.json.update package.json + # update devworkspace generator version only for bugfix releases + if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then + jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${NEXT_VERSION}\"" package.json > package.json.update + mv package.json.update package.json + fi popd >/dev/null || exit COMMIT_MSG="chore: Bump to ${NEXT_VERSION} in ${BUMP_BRANCH}" @@ -177,9 +179,7 @@ git commit -asm "${COMMIT_MSG}" git tag "${VERSION}" git push origin "${VERSION}" - - -# now update ${BASEBRANCH} to the new snapshot version +# now update ${BASEBRANCH} to the new next version git checkout "${BASEBRANCH}" # update template in the branch @@ -189,12 +189,12 @@ update_issue_template "${VERSION}" "${ISSUE_TEMPLATE_FILE}" if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then # bump the y digit, if it is a major release [[ $BRANCH =~ ^([0-9]+)\.([0-9]+)\.x ]] && BASE=${BASH_REMATCH[1]}; NEXT=${BASH_REMATCH[2]}; (( NEXT=NEXT+1 )) # for BRANCH=0.1.x, get BASE=0, NEXT=2 - NEXT_VERSION_Y="${BASE}.${NEXT}.0-SNAPSHOT" + NEXT_VERSION_Y="${BASE}.${NEXT}.0-next" bump_version "${NEXT_VERSION_Y}" "${BASEBRANCH}" fi # bump the z digit [[ ${VERSION#v} =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]] && BASE="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"; NEXT="${BASH_REMATCH[3]}"; (( NEXT=NEXT+1 )) # for VERSION=0.1.2, get BASE=0.1, NEXT=3 -NEXT_VERSION_Z="${BASE}.${NEXT}-SNAPSHOT" +NEXT_VERSION_Z="${BASE}.${NEXT}-next" bump_version "${NEXT_VERSION_Z}" "${BRANCH}" # cleanup tmp dir