mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: Remove redundant NPM publishing code (#46425)
* chore(build): remove npm package:publishPrevious script and release-npm-packages.sh * ci(drone): bump grabpl to v2.9.31
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGES=("@grafana/ui" "@grafana/data" "@grafana/toolkit" "@grafana/runtime" "@grafana/e2e" "@grafana/e2e-selectors" "@grafana/schema")
|
||||
|
||||
GRAFANA_TAG=${1:-}
|
||||
RELEASE_CHANNEL="latest"
|
||||
|
||||
if echo "$GRAFANA_TAG" | grep -q "^v"; then
|
||||
_grafana_version=$(echo "${GRAFANA_TAG}" | cut -d "v" -f 2)
|
||||
else
|
||||
echo "Provided tag is not a version tag, skipping packages release..."
|
||||
exit
|
||||
fi
|
||||
|
||||
if grep -q "beta" <<< "$GRAFANA_TAG"; then
|
||||
RELEASE_CHANNEL="next"
|
||||
fi
|
||||
|
||||
echo "$_grafana_version"
|
||||
|
||||
# lerna bootstrap might have created yarn.lock
|
||||
git checkout .
|
||||
|
||||
# Get current version from lerna.json
|
||||
# Since this happens on tagged branch, the lerna.json version and package.json file SHOULD be updated already
|
||||
# as specified in release guideline
|
||||
PACKAGE_VERSION=$(grep '"version"' lerna.json | cut -d '"' -f 4)
|
||||
|
||||
echo "Releasing grafana packages @ ${PACKAGE_VERSION} under ${RELEASE_CHANNEL} channel"
|
||||
|
||||
if [ $RELEASE_CHANNEL == "latest" ]; then
|
||||
SCRIPT="publishLatest"
|
||||
elif [ $RELEASE_CHANNEL == "next" ]; then
|
||||
SCRIPT="publishNext"
|
||||
else
|
||||
echo "Unknown channel, skipping packages release"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Publish to NPM registry
|
||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
|
||||
|
||||
echo $'\nPublishing packages to NPM registry'
|
||||
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
|
@@ -1,6 +1,6 @@
|
||||
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
|
||||
|
||||
grabpl_version = 'v2.9.30'
|
||||
grabpl_version = 'v2.9.31'
|
||||
build_image = 'grafana/build-container:1.5.3'
|
||||
publish_image = 'grafana/grafana-ci-deploy:1.3.1'
|
||||
deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image'
|
||||
|
Reference in New Issue
Block a user