Skip to content

Commit

Permalink
Makefile: add dist goal for webstore
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Apr 8, 2019
1 parent 861afc4 commit d88255e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
/chromium
/firefox
/dist
/dist-webstore

/src/node_modules
/src/css
Expand Down
12 changes: 9 additions & 3 deletions Makefile
@@ -1,6 +1,6 @@
VERSION ?= $(shell cat .version)

CLEAN_FILES := chromium firefox dist
CLEAN_FILES := chromium firefox dist dist-webstore
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)

#######################
Expand Down Expand Up @@ -78,8 +78,8 @@ dist: clean extension chromium firefox crx-webstore crx-github

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

(cd chromium && zip -FSr ../dist/chromium.zip *)
(cd firefox && zip -FSr ../dist/firefox.zip *)
(cd chromium && zip -r ../dist/chromium.zip *)
(cd firefox && zip -r ../dist/firefox.zip *)

mv browserpass-webstore.crx dist/
mv browserpass-github.crx dist/
Expand All @@ -89,3 +89,9 @@ dist: clean extension chromium firefox crx-webstore crx-github
done

rm -f dist/$(VERSION).tar.gz

mkdir -p dist-webstore
cp -a chromium dist-webstore/
sed -i '/"key"/d' dist-webstore/chromium/manifest.json
(cd dist-webstore/chromium && zip -r ../chrome.zip *)
rm -rf dist-webstore/chromium

0 comments on commit d88255e

Please sign in to comment.