mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
E2E Selectors: Add 'modified' dist-tag when release includes actual changes (#93813)
* add modified tag to e2e-selectors package * add sleep * pr feedback
This commit is contained in:
parent
f6354339ef
commit
022297f359
@ -44,3 +44,17 @@ echo "$registry_without_protocol/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
|
|||||||
for file in ./npm-artifacts/*.tgz; do
|
for file in ./npm-artifacts/*.tgz; do
|
||||||
npm publish "$file" --tag "$dist_tag" --registry "$registry"
|
npm publish "$file" --tag "$dist_tag" --registry "$registry"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check if any files in packages/grafana-e2e-selectors were changed. If so, add a 'modified' tag to the package
|
||||||
|
CHANGES_COUNT=$(git diff HEAD~1..HEAD --name-only -- packages/grafana-e2e-selectors | awk 'END{print NR}')
|
||||||
|
if (( $CHANGES_COUNT > 0 )); then
|
||||||
|
# Wait a little bit to allow the package to be published to the registry
|
||||||
|
sleep 5s
|
||||||
|
regex_pattern="canary: ([0-9.-]+)"
|
||||||
|
TAGS=$(npm dist-tag ls @grafana/e2e-selectors)
|
||||||
|
if [[ $TAGS =~ $regex_pattern ]]; then
|
||||||
|
echo "$CHANGES_COUNT file(s) in packages/grafana-e2e-selectors were changed. Adding 'modified' tag to @grafana/e2e-selectors@${BASH_REMATCH[1]}"
|
||||||
|
npm dist-tag add @grafana/e2e-selectors@${BASH_REMATCH[1]} modified
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user