diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-13 10:35:55 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-13 10:35:55 +0200 |
commit | 6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff (patch) | |
tree | 2ded40cf312d02003a03a9dcf20fadbe6ef2379b | |
parent | 04feb376a38677ec055843c34afbb296f1d9f7b2 (diff) | |
download | reclaim-webextension-6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff.tar.gz reclaim-webextension-6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff.zip |
support build of chrome and ff webext; use version from latest tag
-rw-r--r-- | Makefile | 12 | ||||
-rwxr-xr-x | bin/build_plugin | 7 | ||||
-rwxr-xr-x | bin/package_plugin | 17 | ||||
-rw-r--r-- | manifest-chrome.json | 40 | ||||
-rw-r--r-- | manifest-firefox.json (renamed from manifest.json) | 2 | ||||
m--------- | ui | 0 |
6 files changed, 75 insertions, 3 deletions
@@ -1,2 +1,14 @@ | |||
1 | all: build package_firefox package_chrome clean | ||
2 | ./bin/build_plugin firefox chrome | ||
3 | |||
1 | build: | 4 | build: |
2 | ./bin/build_plugin | 5 | ./bin/build_plugin |
6 | |||
7 | package_firefox: build | ||
8 | ./bin/package_plugin firefox | ||
9 | |||
10 | package_chrome: build | ||
11 | ./bin/package_plugin chrome | ||
12 | |||
13 | clean: | ||
14 | if test -d build; then rm -rf build; fi | ||
diff --git a/bin/build_plugin b/bin/build_plugin index 2c5ffe0..3f81408 100755 --- a/bin/build_plugin +++ b/bin/build_plugin | |||
@@ -18,6 +18,9 @@ cd .. | |||
18 | 18 | ||
19 | rm -rf ui | 19 | rm -rf ui |
20 | 20 | ||
21 | zip -r $DEST/reclaim-plugin.zip -FS * | 21 | if test -d $DEST/build |
22 | rm -rf $TEMPDIR | 22 | then |
23 | rm -rf $DEST/build | ||
24 | fi | ||
25 | mv $TEMPDIR $DEST/build | ||
23 | cd $DEST | 26 | cd $DEST |
diff --git a/bin/package_plugin b/bin/package_plugin new file mode 100755 index 0000000..f846f5f --- /dev/null +++ b/bin/package_plugin | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | TEMPDIR=build | ||
4 | DEST=$PWD | ||
5 | |||
6 | cd $TEMPDIR | ||
7 | |||
8 | TARGET=$1 | ||
9 | if test $1 != "firefox" -a $1 != "chrome" | ||
10 | then | ||
11 | echo "Unknown extension target. Use 'firefox' or 'chrome'" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | cp manifest-$TARGET.json manifest.json # Set manifest for browser | ||
16 | zip -r $DEST/reclaim-plugin-$TARGET-$(git describe --tags).zip -FS * | ||
17 | cd $DEST | ||
diff --git a/manifest-chrome.json b/manifest-chrome.json new file mode 100644 index 0000000..9896cff --- /dev/null +++ b/manifest-chrome.json | |||
@@ -0,0 +1,40 @@ | |||
1 | { | ||
2 | |||
3 | "manifest_version": 2, | ||
4 | "name": "re:claimID", | ||
5 | "description": "An extension for use with re:claimID.", | ||
6 | "version": "0.13.0", | ||
7 | |||
8 | "browser_action": { | ||
9 | "default_icon": "icons/logo.png", | ||
10 | "theme_icons": [{ | ||
11 | "light": "icons/logo_dark.png", | ||
12 | "dark": "icons/logo.png", | ||
13 | "size": 32 | ||
14 | }], | ||
15 | "default_title": "re:claimID", | ||
16 | "default_popup": "popup/popup.html" | ||
17 | }, | ||
18 | |||
19 | "icons": { | ||
20 | "48": "icons/logo48.png", | ||
21 | "96": "icons/logo96.png" | ||
22 | }, | ||
23 | |||
24 | "background": { | ||
25 | "scripts": [ | ||
26 | "background/reclaim.js", | ||
27 | "scripts/gnunet.js" | ||
28 | ] | ||
29 | }, | ||
30 | |||
31 | "permissions": ["storage", "https://api.reclaim/*", "https://ui.reclaim/*", "http://localhost:7776/*", | ||
32 | "webRequest", "webRequestBlocking"], | ||
33 | "web_accessible_resources": ["*/**", "index.html", "*.js", "assets/*", "*.woff*", "*.ttf", "*.svg"], | ||
34 | |||
35 | "options_ui": { | ||
36 | "page": "index.html", | ||
37 | "open_in_tab": true, | ||
38 | "chrome_style": true | ||
39 | } | ||
40 | } | ||
diff --git a/manifest.json b/manifest-firefox.json index ff07a58..da98670 100644 --- a/manifest.json +++ b/manifest-firefox.json | |||
@@ -3,7 +3,7 @@ | |||
3 | "manifest_version": 2, | 3 | "manifest_version": 2, |
4 | "name": "re:claimID", | 4 | "name": "re:claimID", |
5 | "description": "An extension for use with re:claimID.", | 5 | "description": "An extension for use with re:claimID.", |
6 | "version": "0.3.0", | 6 | "version": "0.13.0", |
7 | 7 | ||
8 | "applications": { | 8 | "applications": { |
9 | "gecko": { | 9 | "gecko": { |
diff --git a/ui b/ui | |||
Subproject 7c39f4d7980edda8fdfa65f0304153d6205791d | Subproject 8f771fe65b5fa62b9533d54a20044067f1086ff | ||