forked from tubearchivist/browser-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·54 lines (36 loc) · 961 Bytes
/
deploy.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
53
54
#!/bin/bash
# build package
set -e
if [[ $(basename "$(pwd)") != 'tubearchivist_browserextension' ]]; then
echo 'not in tubearchivist_browserextension folder'
exit 1
fi
echo "latest tags:"
git tag | tail -n 5 | sort -r
printf "\ncreate new version:\n"
read -r VERSION
# build release zip files
function create_zip {
cd extension
# firefox
rm manifest.json
cp manifest-firefox.json manifest.json
zip -rq ../release/ta-companion-"$VERSION"-firefox.zip . \
-x manifest-chrome.json -x manifest-firefox.json
# chrome
rm manifest.json
cp manifest-chrome.json manifest.json
zip -rq ../release/ta-companion-"$VERSION"-chrome.zip . \
-x manifest-chrome.json -x manifest-firefox.json
rm manifest.json
cd ..
}
# create release tag
function create_release {
git tag -a "$VERSION" -m "new release version $VERSION"
git push origin "$VERSION"
}
create_zip
create_release
##
exit 0