-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (22 loc) · 995 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
define USAGE
Tool for building a browser extension for Chrome or Firefox
Usage: make [options] [target] ...
Targets:
endef
export USAGE
help: ## Show this help.
@echo "$$USAGE" && fgrep -h "##" $(firstword $(MAKEFILE_LIST)) | sed 's/\([^ ]*\).*##\(.*\)/ \1\t\2/g' | fgrep -v 'fgrep'
# web-ext run --firefox=/Applications/Firefox\ Developer\ Edition.app/Contents/MacOS/firefox-bin --start-url "https://localhost:3000/login"
link\:firefox: ## link manifest.json for Firefox
@cd src && rm manifest.json && ln -s manifest-v2.json manifest.json
link\:chrome: ## link manifest.json for Chrome
@cd src && rm manifest.json && ln -s manifest-v3.json manifest.json
build: ## create bundle for an extension
@web-ext build -s src -a build
sign: ## sign an extension for Firefox
@web-ext sign -s src --api-key=$AMO_JWT_ISSUER --api-secret=$AMO_JWT_SECRET -a build
firefox: ## build for Firefox
@make link:firefox sign build
chrome: ## build for Chrome
@make link:chrome build
.PHONY: build