Skip to content

Commit 9612b17

Browse files
committed
npm publish script helper
1 parent a92b121 commit 9612b17

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

extra/npm/publish-all.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# The publish will fail if the package name and version combination already exists in the specified registry.
5+
6+
version="1.2.0"
7+
versionFull="0.19.1-$version"
8+
return=$(pwd)
9+
10+
cd packages/lamdera-darwin-arm64
11+
curl https://static.lamdera.com/bin/lamdera-$version-macos-arm64 -o lamdera
12+
chmod a+x lamdera
13+
npm publish --access public
14+
cd "$return"
15+
16+
cd packages/lamdera-darwin-x64
17+
curl https://static.lamdera.com/bin/lamdera-$version-macos-x86_64 -o lamdera
18+
chmod a+x lamdera
19+
npm publish --access public
20+
cd "$return"
21+
22+
cd packages/lamdera-linux-arm64
23+
curl https://static.lamdera.com/bin/lamdera-$version-linux-arm64 -o lamdera
24+
chmod a+x lamdera
25+
npm publish --access public
26+
cd "$return"
27+
28+
cd packages/lamdera-linux-x64
29+
curl https://static.lamdera.com/bin/lamdera-$version-linux-x86_64 -o lamdera
30+
chmod a+x lamdera
31+
npm publish --access public
32+
cd "$return"
33+
34+
cd packages/lamdera-win32-x64
35+
curl https://static.lamdera.com/bin/lamdera-$version-win-x86_64.zip -o lamdera.zip
36+
unzip -o lamdera.zip
37+
mv lamdera/* ./
38+
chmod a+x lamdera.exe
39+
rm -rf lamdera.zip lamdera
40+
npm publish --access public
41+
cd "$return"
42+
43+
44+
exit
45+
46+
# When we have an arm32 bit build working we can publish this
47+
# cd packages/lamdera-linux-arm
48+
# curl https://static.lamdera.com/bin/lamdera-$version-linux-arm -o lamdera
49+
# chmod a+x lamdera
50+
# npm publish --access public
51+
# cd "$return" || exit

0 commit comments

Comments
 (0)