-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makebeta
37 lines (29 loc) · 1.5 KB
/
Makebeta
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
#!/bin/bash
# This file is part of TbSync.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $1 link to base web server : https://tbsync.jobisoft.de/beta
# $2 local path of base web server : /var/www/jobisoft.de/tbsync/beta
# $3 name of XPI : TbSync.xpi
git clean -df
git checkout -- .
git pull
version=$(cat manifest.json | jq -r .version)
updatefile=update-tbsync.json
sed -i "s/%VERSION%/$version/g" "beta-release-channel-update.json"
sed -i "s|%LINK%|$1/$3|g" "beta-release-channel-update.json"
sed -i "s/apiVersion: \"/apiVersion: \"Beta /g" "content/tbsync.jsm"
sed -i "s|https://addons.thunderbird.net/addon/dav-4-tbsync/|$1/DAV-4-TbSync.xpi|g" "content/modules/providers.js"
sed -i "s|https://addons.thunderbird.net/addon/eas-4-tbsync/|$1/EAS-4-TbSync.xpi|g" "content/modules/providers.js"
echo "Releasing version $version via beta release channel (will include updateURL)"
sed -i "s|\"name\": \"TbSync\",|\"name\": \"TbSync [Beta Release Channel]\",|g" "manifest.json"
sed -i "s|\"gecko\": {|\"gecko\": {\n \"update_url\": \"$1/$updatefile\",|g" "manifest.json"
cp beta-release-channel-update.json $2/$updatefile
rm -f $3
rm -f $3.tar.gz
zip -r $3 content _locales manifest.json background.js LICENSE CONTRIBUTORS.md
tar cfvz $3.tar.gz content _locales manifest.json background.js LICENSE CONTRIBUTORS.md
cp $3 $2/$3
cp $3.tar.gz $2/$3.tar.gz