forked from neo4j-labs/neodash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish-and-sign.sh
45 lines (35 loc) · 931 Bytes
/
publish-and-sign.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
PWD=~/IdeaProjects/neodash/
APPNAME=NeoDash
cd $PWD
npm run-script build
npm pack
rm -rf target
mkdir target
mv *.tgz target/
cd target/
tar -xvf *.tgz
rm -f *.tgz
# cp -r package/build package/dist
cp package/dist/favicon.ico package/favicon.ico
# Remove certificates and keys
rm package/*.cert
rm package/*.pem
GRAPH_APP_PASSPHRASE=$( cat ../desktop.passphrase )
# sign the code & verify
npx @neo4j/code-signer --app ./package --private-key ../neo4j-labs-app.pem --cert ../neo4j-labs-app.cert --passphrase $GRAPH_APP_PASSPHRASE
npx @neo4j/code-signer --verify --app ./package --root-cert ../neo4j_desktop.cert
# pack it back up again
cd package
npm pack
mv *.tgz ../
# remove the package folder
rm -rf package
cd ..
# verify it again
tar xvf *.tgz package
npx @neo4j/code-signer --verify \
--app ./package \
--root-cert ../neo4j_desktop.cert
rm -rf package
# Publish to npm
npm publish --access public neodash*.tgz