Skip to content

Commit 74f1046

Browse files
authored
change snapshot to next for dev versioning (#22508)
Signed-off-by: Mykhailo Kuznietsov <[email protected]>
1 parent 8a0bacc commit 74f1046

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

.github/workflows/typescript-publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
npm ci && npm run tsc
4949
5050
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
51-
CURRENT_VERSION=$(sed -r 's/(.*)-SNAPSHOT/\1/' ../../VERSION)
52-
NEW_VERSION="${CURRENT_VERSION}-dev-${SHORT_SHA1}"
51+
CURRENT_VERSION=$(sed -r 's/(.*)-next/\1/' ../../VERSION)
52+
NEW_VERSION="${CURRENT_VERSION}-next-${SHORT_SHA1}"
5353
sed -i -r -e "s/(\"version\": )(\".*\")/\1\"$NEW_VERSION\"/" package.json
5454
5555
npm publish --tag $DIST_TAG

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.75.0-SNAPSHOT
1+
7.75.0-next

make-release.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ update_issue_template() {
3939
local -r templateFile=$2
4040

4141
# take only two first digits of the version that we will release
42-
# will get 7.35 from input 7.35.0-SNAPSHOT
42+
# will get 7.74 from input 7.74.0-next
4343
local -r versionXY=$(echo "${currentReleaseVersion}" | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')
4444

4545
# now extract the current latest version specified in the issue template
@@ -76,9 +76,12 @@ bump_version () {
7676

7777
pushd tests/e2e >/dev/null || exit
7878
npm --no-git-tag-version version --allow-same-version "${NEXT_VERSION}"
79-
# update devworkspace generator version
80-
jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${NEXT_VERSION}\"" package.json > package.json.update
81-
mv package.json.update package.json
79+
# update devworkspace generator version only for bugfix releases
80+
if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then
81+
jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${NEXT_VERSION}\"" package.json > package.json.update
82+
mv package.json.update package.json
83+
fi
84+
npm run prettier
8285
popd >/dev/null || exit
8386

8487
COMMIT_MSG="chore: Bump to ${NEXT_VERSION} in ${BUMP_BRANCH}"
@@ -160,6 +163,7 @@ pushd tests/e2e >/dev/null || exit
160163
jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${VERSION}\"" package.json > package.json.update
161164
mv package.json.update package.json
162165
npm --no-git-tag-version version --allow-same-version "${VERSION}"
166+
npm run prettier
163167
popd >/dev/null || exit
164168

165169
docker build -t quay.io/eclipse/che-e2e:${VERSION} -f tests/e2e/build/dockerfiles/Dockerfile tests/e2e
@@ -177,9 +181,7 @@ git commit -asm "${COMMIT_MSG}"
177181
git tag "${VERSION}"
178182
git push origin "${VERSION}"
179183

180-
181-
182-
# now update ${BASEBRANCH} to the new snapshot version
184+
# now update ${BASEBRANCH} to the new next version
183185
git checkout "${BASEBRANCH}"
184186

185187
# update template in the branch
@@ -189,12 +191,12 @@ update_issue_template "${VERSION}" "${ISSUE_TEMPLATE_FILE}"
189191
if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then
190192
# bump the y digit, if it is a major release
191193
[[ $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
192-
NEXT_VERSION_Y="${BASE}.${NEXT}.0-SNAPSHOT"
194+
NEXT_VERSION_Y="${BASE}.${NEXT}.0-next"
193195
bump_version "${NEXT_VERSION_Y}" "${BASEBRANCH}"
194196
fi
195197
# bump the z digit
196198
[[ ${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
197-
NEXT_VERSION_Z="${BASE}.${NEXT}-SNAPSHOT"
199+
NEXT_VERSION_Z="${BASE}.${NEXT}-next"
198200
bump_version "${NEXT_VERSION_Z}" "${BRANCH}"
199201

200202
# cleanup tmp dir

tests/e2e/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eclipse-che/che-e2e",
3-
"version": "7.73.0-SNAPSHOT",
3+
"version": "7.75.0-next",
44
"description": "",
55
"main": "dist/index.js",
66
"scripts": {

tests/e2e/specs/miscellaneous/CreateWorkspaceWithExistedName.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ suite(`"Start workspace with existed workspace name" test`, function (): void {
5151
existedWorkspaceName = WorkspaceHandlingTests.getWorkspaceName();
5252
await workspaceHandlingTests.stopWorkspace(existedWorkspaceName);
5353
await browserTabsUtil.closeAllTabsExceptCurrent();
54-
});
54+
});
5555

5656
test(`Create new workspace from the same ${stackName} stack`, async function (): Promise<void> {
5757
existedWorkspaceName = WorkspaceHandlingTests.getWorkspaceName();

0 commit comments

Comments
 (0)