blob: b2c9d494831bafc9d233960ce1b7297d2a736496 [file] [log] [blame]
Adrià Vilanova Martínezd4f82c52022-05-29 21:54:34 +02001.PHONY: node_deps clean_dist deps clean_deps serve_chromium release release_chromium_stable release_chromium_beta build_test_extension clean_releases clean
avm99963f01af0e2020-12-26 23:11:10 +01002
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +02003.DEFAULT_GOAL := release
4WEBPACK := ./node_modules/webpack-cli/bin/cli.js
5RELEASE_SCRIPT := bash tools/release.bash
avm99963f01af0e2020-12-26 23:11:10 +01006
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +02007node_deps:
8 npm ci --no-save
avm999639bbb3a42020-12-29 03:29:44 +01009
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +020010clean_dist:
11 rm -rf dist
avm99963f01af0e2020-12-26 23:11:10 +010012
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +020013deps: node_deps
14 mkdir -p dist
15
16clean_deps:
17 rm -rf node_modules
18
19
20serve_chromium: deps
21 $(WEBPACK) --mode development --env browser_target=chromium --watch
22
23release: release_chromium_stable release_chromium_beta
24
25release_chromium_stable: deps
26 $(WEBPACK) --mode production --env browser_target=chromium
27 $(RELEASE_SCRIPT) -c stable -b chromium -f
28 rm -rf dist/chromium
29
30release_chromium_beta: deps
31 $(WEBPACK) --mode production --env browser_target=chromium
32 $(RELEASE_SCRIPT) -c beta -b chromium -f
33 rm -rf dist/chromium
34
Adrià Vilanova Martínezd4f82c52022-05-29 21:54:34 +020035# Target to build the extension for webext lint in the Zuul Check Pipeline.
36build_test_extension: deps
37 $(WEBPACK) --mode production --env browser_target=chromium
38 $(RELEASE_SCRIPT) -c stable -b chromium -f
39
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +020040clean_releases:
avm99963f01af0e2020-12-26 23:11:10 +010041 rm -rf out
Adrià Vilanova Martíneza197d862022-05-27 17:33:20 +020042
43clean: clean_deps clean_dist clean_releases