Skip to content

Commit d88255e

Browse files
committed
Makefile: add dist goal for webstore
1 parent 861afc4 commit d88255e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/chromium
22
/firefox
33
/dist
4+
/dist-webstore
45

56
/src/node_modules
67
/src/css

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION ?= $(shell cat .version)
22

3-
CLEAN_FILES := chromium firefox dist
3+
CLEAN_FILES := chromium firefox dist dist-webstore
44
CHROME := $(shell which chromium 2>/dev/null || which chromium-browser 2>/dev/null || which chrome 2>/dev/null || which google-chrome 2>/dev/null || which google-chrome-stable 2>/dev/null)
55

66
#######################
@@ -78,8 +78,8 @@ dist: clean extension chromium firefox crx-webstore crx-github
7878

7979
git archive -o dist/$(VERSION).tar.gz --format tar.gz --prefix=browserpass-extension-$(VERSION)/ $(VERSION)
8080

81-
(cd chromium && zip -FSr ../dist/chromium.zip *)
82-
(cd firefox && zip -FSr ../dist/firefox.zip *)
81+
(cd chromium && zip -r ../dist/chromium.zip *)
82+
(cd firefox && zip -r ../dist/firefox.zip *)
8383

8484
mv browserpass-webstore.crx dist/
8585
mv browserpass-github.crx dist/
@@ -89,3 +89,9 @@ dist: clean extension chromium firefox crx-webstore crx-github
8989
done
9090

9191
rm -f dist/$(VERSION).tar.gz
92+
93+
mkdir -p dist-webstore
94+
cp -a chromium dist-webstore/
95+
sed -i '/"key"/d' dist-webstore/chromium/manifest.json
96+
(cd dist-webstore/chromium && zip -r ../chrome.zip *)
97+
rm -rf dist-webstore/chromium

0 commit comments

Comments
 (0)