-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 697 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (29 loc) · 697 Bytes
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
32
33
34
35
PACKAGE_NAME := web-extensions-security-checker
VERSION := $(shell awk -F '"' '/"version"/ { print $$4; exit }' manifest.json)
BUILD_DIR := dist
ZIP_NAME := $(PACKAGE_NAME)-v$(VERSION).zip
PACKAGE_FILES := \
manifest.json \
background.js \
popup.html \
popup.js \
risk-rules.js \
utils.js \
shield-16.png \
shield-48.png \
shield-128.png \
shield-danger.png \
README.md \
LICENSE
.PHONY: build test clean-build
build: $(BUILD_DIR)/$(ZIP_NAME)
$(BUILD_DIR)/$(ZIP_NAME): $(PACKAGE_FILES)
@mkdir -p $(BUILD_DIR)
@rm -f $@
@zip -r $@ $(PACKAGE_FILES) >/dev/null
@echo "Built package: $@"
test:
@npm test
clean-build:
@rm -f $(BUILD_DIR)/*.zip
@echo "Cleaned old zip packages"