-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildtool.sh
38 lines (25 loc) · 904 Bytes
/
buildtool.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
#!/usr/bin/env bash
echo "* Firefox Buildtool: Packer Script"
DES=build/krpatch.cinderella.girls
rm -rf $DES
mkdir -p $DES
echo "* Firefox Buildtool: Copy Files"
cp manifest.json $DES/
cp -R images $DES/images
cp -R css $DES/css
cp -R js $DES/js
set +v
echo "* Firefox Buildtool: Creating package..."
pushd $DES/ > /dev/null
# zip ../krpatch.cinderella.girls.xpi -qr *
# https://github.com/mozilla/web-ext/issues/793
unset WEB_EXT_API_KEY
unset WEB_EXT_API_SECRET
web-ext lint -v
# https://github.com/mozilla/web-ext/issues/793
export WEB_EXT_API_KEY=$ENV_WEB_EXT_API_KEY
export WEB_EXT_API_SECRET=$ENV_WEB_EXT_API_SECRET
web-ext sign -v
zsh -c 'autoload zmv; zmv "web-ext-artifacts/_-(*)-an+fx.xpi" "../cg-krpatch-$1-an+fx.xpi"'
popd > /dev/null
echo "* Firefox Buildtool: Done."