Skip to content

Commit 5f39687

Browse files
committed
create chrome-specific build structure
1 parent b1a9165 commit 5f39687

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+36
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

chrome/build.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash -e
2+
3+
# uncomment for debug
4+
#set -x
5+
6+
args=("$@")
7+
8+
VERSION=$(sed -nr '/"version"/s:.*"(.*)",$:\1:p' ../extension/manifest.json)
9+
10+
if [ "$1" = "devel" ]; then
11+
KEY="webpg-chrome-devel"
12+
NAME=$KEY
13+
sed -ri 's/(\.)([0-9]+)/echo \1$((\2+1))/ge' current_build
14+
BUILD_NO=$(cat current_build)
15+
sed -ri "s/^(\s*\"version\":\s*)\"(.*)\",$/\1\"\2$BUILD_NO\",/g" ../extension/manifest.json
16+
else
17+
KEY="extension"
18+
NAME="webpg-chrome-v$VERSION"
19+
fi
20+
21+
if [ ! -d "output" ]; then
22+
mkdir output;
23+
fi
24+
25+
if [ -f "output/$NAME.zip" ]; then
26+
rm output/$NAME.zip
27+
fi
28+
29+
pushd ../$KEY
30+
zip -r ../chrome/output/$NAME.zip . -x "*XULContent*"
31+
popd
32+
33+
sed -ri "s/^(\s*\"version\":\s*)\"(.*)\",$/\1\"$VERSION\",/g" ../extension/manifest.json
34+
buildcrx output/$NAME.zip $KEY.pem output/$NAME.crx

chrome/current_build

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.152

extension/_locales

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../chrome/_locales

0 commit comments

Comments
 (0)