forked from oracle/oci-grafana-logs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·53 lines (43 loc) · 1.16 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#Do grunt work
# nvm install 12.20
# nvm use 12.20
if [[ ! -d ./node_modules ]]; then
echo "dependencies not installed try running: yarn"
exit 1
fi
rm -rf ./oci-logs-datasource
rm ./oci-logs-datasource.zip
rm ./plugin.tar
# yarn create @grafana/plugin
yarn run build
if [ $? -ne 0 ]; then
echo "yarn returned error"
exit 1
fi
mage --debug -v
cp LICENSE.txt ./dist/LICENSE
if [ -z $1 ]; then
echo "sign argument not specified, continuing without sign the plugin"
else
if [ $1 = "sign" ]; then
npx @grafana/sign-plugin
else
echo "Usage: ./build.sh <sign>"
fi
fi
mv ./dist ./oci-logs-datasource
tar cvf plugin.tar ./oci-logs-datasource
zip -r oci-logs-datasource ./oci-logs-datasource
# Instructions for signing
# Please make sure
# nvm install 12.20
# nvm use 12.20
# yarn
# For grafana publishing
# yarn install --pure-lockfile && yarn build
#
# Please make sure if you have the api keys installed in bash profile in name, GRAFANA_API_KEY
# Note : Please make sure that you are running the commands in a non-proxy env and without vpn, else grafana signing might fail"
# yarn global add @grafana/toolkit
# grafana-toolkit plugin:sign