Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Commit

Permalink
sign
Browse files Browse the repository at this point in the history
  • Loading branch information
corajr committed Apr 10, 2017
1 parent 521977f commit d75c9f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.PHONY: all xpi test
.PHONY: all xpi test check-env check-jwt-issuer check-jwt-secret

SOURCES := $(wildcard *.js) $(wildcard lib/*.js)
INSTALL_RDF_PATCH := $(abspath install.rdf.patch)
UNSIGNED_XPI := zotero-voyant-export.xpi

all: xpi

xpi: zotero-voyant-export.xpi
xpi: $(UNSIGNED_XPI)

zotero-voyant-export.xpi: $(SOURCES) $(INSTALL_RDF_PATCH)
$(UNSIGNED_XPI): $(SOURCES) $(INSTALL_RDF_PATCH)
rm -f $@
jpm xpi --dest-dir /tmp
rm -rf /tmp/zotero-voyant-export
Expand All @@ -18,3 +19,18 @@ zotero-voyant-export.xpi: $(SOURCES) $(INSTALL_RDF_PATCH)

test:
jpm test -b "/Applications/Nightly.app"

check-env: check-jwt-issuer check-jwt-secret

check-jwt-issuer:
ifndef JWT_ISSUER
$(error JWT_ISSUER is undefined)
endif

check-jwt-secret:
ifndef JWT_SECRET
$(error JWT_SECRET is undefined)
endif

sign: $(UNSIGNED_XPI) check-env
jpm sign --api-key $(JWT_ISSUER) --api-secret $(JWT_SECRET) --xpi $<
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ for an indication of what has been/will be done. Help is very welcome!

Run `make` to create a new XPI.

Signing can be done with `make sign`, if you have the `JWT_ISSUER` and
`JWT_SECRET` environment variables set.

### Tests

Run the tests using Firefox Nightly, e.g.:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"engines": {
"firefox": ">=38.0a1"
},
"updateURL": "https://corajr.github.io/zotero-voyant-export/update.rdf",
"license": "AGPL-3.0",
"keywords": [
"jetpack"
Expand Down

0 comments on commit d75c9f1

Please sign in to comment.