This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git
The following commit(s) were added to refs/heads/main by this push:
new 17360c1 fix: correct malformed next-dev version + validate versions
in release.sh (#68)
17360c1 is described below
commit 17360c1af68fc4c52fec52fbe4b13defe782107e
Author: 吴晟 Wu Sheng <[email protected]>
AuthorDate: Mon Jun 22 19:02:09 2026 +0800
fix: correct malformed next-dev version + validate versions in release.sh
(#68)
---
CHANGELOG.md | 2 +-
apps/bff/package.json | 2 +-
apps/bff/src/server.ts | 2 +-
apps/ui/package.json | 2 +-
package.json | 2 +-
packages/api-client/package.json | 2 +-
packages/design-tokens/package.json | 2 +-
packages/templates/package.json | 2 +-
scripts/release.sh | 16 ++++++++++++++++
9 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b50e58..9dfdb63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@ Notable changes to Apache SkyWalking Horizon UI, written from
the operator's poi
The version line is shared by every package in the monorepo (apps + shared
packages) plus the BFF's `HORIZON_VERSION` default.
-## 1.0.0-dev
+## 1.0.0
(In development — fill in highlights here before cutting the release.)
diff --git a/apps/bff/package.json b/apps/bff/package.json
index bfbb807..4fdf795 100644
--- a/apps/bff/package.json
+++ b/apps/bff/package.json
@@ -1,6 +1,6 @@
{
"name": "@skywalking-horizon-ui/bff",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"type": "module",
"main": "dist/server.js",
diff --git a/apps/bff/src/server.ts b/apps/bff/src/server.ts
index 482bd39..55da584 100644
--- a/apps/bff/src/server.ts
+++ b/apps/bff/src/server.ts
@@ -334,7 +334,7 @@ if (staticDir && existsSync(staticDir)) {
// admin status pages.
app.get('/api/health', async () => ({
status: 'ok',
- version: process.env.HORIZON_VERSION ?? '1.0.0-dev-dev',
+ version: process.env.HORIZON_VERSION ?? '1.0.0-dev',
}));
const { host, port } = source.current.server;
diff --git a/apps/ui/package.json b/apps/ui/package.json
index dec74e6..1a25b03 100644
--- a/apps/ui/package.json
+++ b/apps/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@skywalking-horizon-ui/ui",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"type": "module",
"scripts": {
diff --git a/package.json b/package.json
index 68504ed..61fe0f1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "skywalking-horizon-ui",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"description": "Apache SkyWalking Horizon UI - next-generation web UI",
"license": "Apache-2.0",
diff --git a/packages/api-client/package.json b/packages/api-client/package.json
index e31d5d1..4a4ea72 100644
--- a/packages/api-client/package.json
+++ b/packages/api-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@skywalking-horizon-ui/api-client",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"type": "module",
"main": "./dist/index.js",
diff --git a/packages/design-tokens/package.json
b/packages/design-tokens/package.json
index db5436f..083a028 100644
--- a/packages/design-tokens/package.json
+++ b/packages/design-tokens/package.json
@@ -1,6 +1,6 @@
{
"name": "@skywalking-horizon-ui/design-tokens",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"type": "module",
"main": "./dist/index.js",
diff --git a/packages/templates/package.json b/packages/templates/package.json
index c97989c..b195ccc 100644
--- a/packages/templates/package.json
+++ b/packages/templates/package.json
@@ -1,6 +1,6 @@
{
"name": "@skywalking-horizon-ui/templates",
- "version": "1.0.0-dev-dev",
+ "version": "1.0.0-dev",
"private": true,
"type": "module",
"main": "./dist/index.js",
diff --git a/scripts/release.sh b/scripts/release.sh
index 7335eee..9320107 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -143,6 +143,22 @@ if ! confirm "Are these correct?"; then
read -r -p "Enter release version: " RELEASE_VERSION
read -r -p "Enter next version (without -dev suffix): "
NEXT_RELEASE_VERSION
fi
+
+# Normalize + validate both versions. The "next version" prompt asks for a
+# BARE X.Y.Z — the script appends `-dev` itself (Step 15) — so strip a stray
+# leading `v` / `-dev` / `-SNAPSHOT` an operator may have typed anyway, then
+# reject anything that isn't a clean semver core. Without this, entering
+# "1.0.0-dev" at the prompt silently produces the malformed "1.0.0-dev-dev".
+for _var in RELEASE_VERSION NEXT_RELEASE_VERSION; do
+ _val="${!_var}"
+ _val="${_val#v}"; _val="${_val%-dev}"; _val="${_val%-SNAPSHOT}"
+ if [[ ! "${_val}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ err "${_var} '${!_var}' is not a clean version — enter a bare X.Y.Z
(e.g. 1.0.0), without a -dev suffix."
+ exit 1
+ fi
+ printf -v "${_var}" '%s' "${_val}"
+done
+
TAG="v${RELEASE_VERSION}"
# ========================== Step 4: Version-consistency check
==========================