Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit bf262e8

Browse files
committed
first pass at a build-addon script
1 parent 75d0a8c commit bf262e8

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
2-
web-ext-artifacts/
2+
signed-addon.xpi
33
src/vendor/*
44
src/sidebar/vendor/*
55
src/_locales
6+
web-ext-artifacts/

bin/build-addon.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -ex
3+
npm install
4+
5+
if [[ -z $TESTPILOT_AMO_USER || -z $TESTPILOT_AMO_SECRET ]]; then
6+
# Could build the development package here if you want
7+
exit 1
8+
9+
else
10+
# for the locales
11+
npm run build
12+
# get rid of the unsigned xpi
13+
rm -f ./web-ext-artifacts/*.xpi
14+
15+
./node_modules/.bin/web-ext sign \
16+
--source-dir src \
17+
--api-key $TESTPILOT_AMO_USER \
18+
--api-secret $TESTPILOT_AMO_SECRET
19+
mv ./web-ext-artifacts/*.xpi ./signed-addon.xpi
20+
21+
fi

0 commit comments

Comments
 (0)