From 6ee3db15e403d68e52b2197a472de63aaddd21a7 Mon Sep 17 00:00:00 2001 From: Daniel Mellado <1313475+danielmellado@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:38:15 +0200 Subject: [PATCH] Add version in web/ui/package-lock.json (#12771) This commit adds the option --include-workspace-root in ui_release.sh npm scripts in order to also include the version in web/ui/pagkage jsons files when bumping the version. This also avoids issues when building directly with npm install on some systems. Signed-off-by: Daniel Mellado --- scripts/ui_release.sh | 2 +- web/ui/README.md | 4 ++-- web/ui/package-lock.json | 2 ++ web/ui/package.json | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/ui_release.sh b/scripts/ui_release.sh index 0f251690b..ea4423d25 100755 --- a/scripts/ui_release.sh +++ b/scripts/ui_release.sh @@ -85,7 +85,7 @@ function bumpVersion() { fi done # increase the version on all packages - npm version "${version}" --workspaces + npm version "${version}" --workspaces --include-workspace-root } if [[ "$1" == "--copy" ]]; then diff --git a/web/ui/README.md b/web/ui/README.md index 13e635d9d..465adf537 100644 --- a/web/ui/README.md +++ b/web/ui/README.md @@ -1,9 +1,9 @@ ## Overview The `ui` directory contains static files and templates used in the web UI. For -easier distribution they are compressed (c.f. Makefile) and statically compiled +easier distribution they are compressed (c.f. Makefile) and statically compiled into the Prometheus binary using the embed package. -During development it is more convenient to always use the files on disk to +During development it is more convenient to always use the files on disk to directly see changes without recompiling. To make this work, remove the `builtinassets` build tag in the `flags` entry in `.promu.yml`, and then `make build` (or build Prometheus using diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json index c4bf7fb8a..95d7d70b1 100644 --- a/web/ui/package-lock.json +++ b/web/ui/package-lock.json @@ -1,10 +1,12 @@ { "name": "prometheus-io", + "version": "0.46.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "prometheus-io", + "version": "0.46.0", "workspaces": [ "react-app", "module/*" diff --git a/web/ui/package.json b/web/ui/package.json index a6a4d6a32..a6b08715f 100644 --- a/web/ui/package.json +++ b/web/ui/package.json @@ -27,5 +27,6 @@ "react-scripts": "^5.0.1", "ts-jest": "^29.1.0", "typescript": "^4.9.5" - } + }, + "version": "0.46.0" }