Commit de9ea829 by Dominik Prokop Committed by GitHub

Packages: stable release tags update (#20417)

* Update next npm tag when publishing stable release

* shellcheck fix
parent ef4d98b4
...@@ -15,7 +15,7 @@ All packages are versioned according to the current Grafana version: ...@@ -15,7 +15,7 @@ All packages are versioned according to the current Grafana version:
### Stable releases ### Stable releases
> **Even though packages are released under a stable version, they are considered ALPHA until further notice!** > **Even though packages are released under a stable version, they are considered ALPHA until further notice!**
Stable releases are published under the `latest` tag on npm. Stable releases are published under the `latest` tag on npm. If there was alpha/beta version released previously, the `next` tag is updated to stable version.
### Alpha and beta releases ### Alpha and beta releases
Alpha and beta releases are published under the `next` tag on npm. Alpha and beta releases are published under the `next` tag on npm.
...@@ -47,7 +47,7 @@ Automatic prereleases are published under the `canary` dist tag. ...@@ -47,7 +47,7 @@ Automatic prereleases are published under the `canary` dist tag.
5. Push version commit to the release branch. 5. Push version commit to the release branch.
### Building individual packages ### Building individual packages
To build individual packages, run: To build individual packages, run:
``` ```
grafana-toolkit package:build --scope=<ui|toolkit|runtime|data> grafana-toolkit package:build --scope=<ui|toolkit|runtime|data>
......
#!/usr/bin/env bash #!/usr/bin/env bash
PACKAGES=("@grafana/ui" "@grafana/data" "@grafana/toolkit" "@grafana/runtime")
GRAFANA_TAG=${1:-} GRAFANA_TAG=${1:-}
RELEASE_CHANNEL="latest" RELEASE_CHANNEL="latest"
...@@ -41,3 +42,11 @@ yarn packages:build ...@@ -41,3 +42,11 @@ yarn packages:build
echo $'\nPublishing packages' echo $'\nPublishing packages'
yarn packages:${SCRIPT} yarn packages:${SCRIPT}
# When releasing stable(latest) version of packages we are updating previously published next tag(beta) to be the same version as latest
if [ $RELEASE_CHANNEL == "latest" ]; then
for i in "${PACKAGES[@]}"
do
:
npm dist-tag add "$i"@"$PACKAGE_VERSION" next
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment