From 0ae5e948c5ed56546c8e05ec55ed96e08fa1c237 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Mon, 26 Apr 2021 16:42:59 +0300 Subject: [PATCH] Release v5.0.0-alpha.3 (#2623) * v5.0.0-alpha.3 Signed-off-by: Jari Kolehmainen * fix Signed-off-by: Jari Kolehmainen --- .azure-pipelines.yml | 3 +++ Makefile | 1 + build/set_build_version.ts | 23 +++++++++++++++++++++++ package.json | 3 ++- static/RELEASE_NOTES.md | 2 +- 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 build/set_build_version.ts diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 5c062f2935..76e64f0f2c 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -62,6 +62,7 @@ jobs: WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD) AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) + BUILD_NUMBER: $(Build.BuildNumber) - job: macOS pool: vmImage: macOS-10.14 @@ -113,6 +114,7 @@ jobs: CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) + BUILD_NUMBER: $(Build.BuildNumber) - job: Linux pool: vmImage: ubuntu-16.04 @@ -170,6 +172,7 @@ jobs: env: AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) + BUILD_NUMBER: $(Build.BuildNumber) - script: make publish-npm displayName: Publish npm package condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" diff --git a/Makefile b/Makefile index d8a6a35462..e548232aa9 100644 --- a/Makefile +++ b/Makefile @@ -65,6 +65,7 @@ integration-win: binaries/client build-extension-types build-extensions .PHONY: build build: node_modules binaries/client build-extensions + yarn run npm:fix-build-version yarn run compile ifeq "$(DETECTED_OS)" "Windows" yarn run electron-builder --publish onTag --x64 --ia32 diff --git a/build/set_build_version.ts b/build/set_build_version.ts new file mode 100644 index 0000000000..c18abbca9c --- /dev/null +++ b/build/set_build_version.ts @@ -0,0 +1,23 @@ +import * as fs from "fs"; +import * as path from "path"; +import appInfo from "../package.json"; +import semver from "semver"; + +const packagePath = path.join(__dirname, "../package.json"); +const versionInfo = semver.parse(appInfo.version); +const buildNumber = process.env.BUILD_NUMBER || "1"; +let buildChannel = "alpha"; + +if (versionInfo.prerelease) { + if (versionInfo.prerelease.includes("alpha")) { + buildChannel = "alpha"; + } else { + buildChannel = "beta"; + } + appInfo.version = `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}-${buildChannel}.${versionInfo.prerelease[1]}.${buildNumber}`; +} else { + appInfo.version = `${appInfo.version}-latest.${buildNumber}`; +} + + +fs.writeFileSync(packagePath, `${JSON.stringify(appInfo, null, 2)}\n`); diff --git a/package.json b/package.json index a9bea801ad..48628cfa29 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-lens", "productName": "OpenLens", "description": "OpenLens - Open Source IDE for Kubernetes", - "version": "5.0.0-alpha.2", + "version": "5.0.0-alpha.3", "main": "static/build/main.js", "copyright": "© 2021 OpenLens Authors", "license": "MIT", @@ -21,6 +21,7 @@ "compile:main": "yarn run webpack --config webpack.main.ts", "compile:renderer": "yarn run webpack --config webpack.renderer.ts", "compile:extension-types": "yarn run webpack --config webpack.extensions.ts", + "npm:fix-build-version": "yarn run ts-node build/set_build_version.ts", "npm:fix-package-version": "yarn run ts-node build/set_npm_version.ts", "build:linux": "yarn run compile && electron-builder --linux --dir", "build:mac": "yarn run compile && electron-builder --mac --dir", diff --git a/static/RELEASE_NOTES.md b/static/RELEASE_NOTES.md index 76835712ee..11033ac98e 100644 --- a/static/RELEASE_NOTES.md +++ b/static/RELEASE_NOTES.md @@ -2,7 +2,7 @@ Here you can find description of changes we've built into each release. While we try our best to make each upgrade automatic and as smooth as possible, there may be some cases where you might need to do something to ensure the application works smoothly. So please read through the release highlights! -## 5.0.0-alpha.2 (current version) +## 5.0.0-alpha.3 (current version) - Workspaces are replaced by Catalog & Hotbar - YAML Templates in Create Resource dock tab