-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
release.sh
executable file
·34 lines (26 loc) · 892 Bytes
/
release.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
#!/bin/bash
# Get the version
VERSION=$(jq -r .version src/manifest.json)
echo "Version: ${VERSION}"
echo "Building for Chrome"
# Zip for deployment
cd src
zip -r ../build/chrome/chrome-obsidian-clipper-${VERSION}.zip .
cd ../
# Build packed extension
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=./src --pack-extension-key=./key.pem
mv src.crx build/chrome/chrome-obsidian-clipper-${VERSION}.crx
echo "Building for Firefox"
# Web-ext builds for firefox
cd src
web-ext build # Build for firefox
mv web-ext-artifacts/obsidian_clipper-${VERSION}.zip ../build/firefox/firefox-obsidian-clipper-${VERSION}.zip
rm -rf web-ext-artifacts # Remove the build folder
cd ../
# Push to github
git add build
git commit -m "Releasing ${VERSION}"
git tag ${VERSION}
git push origin main
git push --tags
open https://github.com/jplattel/obsidian-clipper/releases/new