Skip to content

Commit

Permalink
update the validator to including signing
Browse files Browse the repository at this point in the history
  • Loading branch information
dcheckoway committed Nov 1, 2024
1 parent f8cbd8c commit d72f1d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ rm -rf dist
npm run build
mage -v

if [ ! -z "$GRAFANA_ACCESS_POLICY_TOKEN" ]; then
npx @grafana/sign-plugin@latest
else
echo "Skipping signing the plugin, set GRAFANA_ACCESS_POLICY_TOKEN to include signing"
fi

cleanup () {
rm -rf ${PLUGIN_ID} ${PLUGIN_ID}.zip
}
trap cleanup EXIT


echo "Copying and zipping"
cleanup # in case stuff was left around from last time
cp -r dist ${PLUGIN_ID}
zip -qr ${PLUGIN_ID}.zip ${PLUGIN_ID}

echo "Invoking the plugin validator"
echo "Invoking the plugin validator (no output, no warnings, no errors is a good thing)"
npx @grafana/plugin-validator@latest -sourceCodeUri file://. ${PLUGIN_ID}.zip
echo "Done"

0 comments on commit d72f1d0

Please sign in to comment.