Adrià Vilanova Martínez | b55b284 | 2024-05-28 19:28:49 +0200 | [diff] [blame^] | 1 | .PHONY: node_deps clean_dist deps clean_deps serve_chromium_mv3 serve_edge serve_edge_mv3 release release_chromium_stable release_chromium_beta release_chromium_canary release_edge build_test_extension clean_releases clean |
avm99963 | f01af0e | 2020-12-26 23:11:10 +0100 | [diff] [blame] | 2 | |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 3 | .DEFAULT_GOAL := release |
| 4 | WEBPACK := ./node_modules/webpack-cli/bin/cli.js |
| 5 | RELEASE_SCRIPT := bash tools/release.bash |
avm99963 | f01af0e | 2020-12-26 23:11:10 +0100 | [diff] [blame] | 6 | |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 7 | node_deps: |
| 8 | npm ci --no-save |
avm99963 | 9bbb3a4 | 2020-12-29 03:29:44 +0100 | [diff] [blame] | 9 | |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 10 | clean_dist: |
| 11 | rm -rf dist |
avm99963 | f01af0e | 2020-12-26 23:11:10 +0100 | [diff] [blame] | 12 | |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 13 | deps: node_deps |
| 14 | mkdir -p dist |
| 15 | |
| 16 | clean_deps: |
| 17 | rm -rf node_modules |
| 18 | |
| 19 | |
Adrià Vilanova Martínez | 86fda49 | 2022-05-31 15:05:21 +0200 | [diff] [blame] | 20 | serve_chromium_mv3: deps |
| 21 | $(WEBPACK) --mode development --env browser_target=chromium_mv3 --watch |
| 22 | |
Adrià Vilanova Martínez | 8b63fb3 | 2022-05-29 23:26:50 +0200 | [diff] [blame] | 23 | serve_edge: deps |
| 24 | $(WEBPACK) --mode development --env browser_target=edge --watch |
| 25 | |
Adrià Vilanova Martínez | 86fda49 | 2022-05-31 15:05:21 +0200 | [diff] [blame] | 26 | serve_edge_mv3: deps |
| 27 | $(WEBPACK) --mode development --env browser_target=edge_mv3 --watch |
| 28 | |
Adrià Vilanova Martínez | 8b63fb3 | 2022-05-29 23:26:50 +0200 | [diff] [blame] | 29 | release: release_chromium_stable release_chromium_beta release_edge |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 30 | |
| 31 | release_chromium_stable: deps |
Adrià Vilanova Martínez | b55b284 | 2024-05-28 19:28:49 +0200 | [diff] [blame^] | 32 | $(WEBPACK) --mode production --env browser_target=chromium_mv3 |
| 33 | $(RELEASE_SCRIPT) -c stable -b chromium_mv3 -f |
| 34 | rm -rf dist/chromium_mv3 |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 35 | |
| 36 | release_chromium_beta: deps |
Adrià Vilanova Martínez | b55b284 | 2024-05-28 19:28:49 +0200 | [diff] [blame^] | 37 | $(WEBPACK) --mode production --env browser_target=chromium_mv3 |
| 38 | $(RELEASE_SCRIPT) -c beta -b chromium_mv3 -f |
| 39 | rm -rf dist/chromium_mv3 |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 40 | |
Adrià Vilanova Martínez | 87e3505 | 2022-06-01 14:05:29 +0200 | [diff] [blame] | 41 | release_chromium_canary: deps |
| 42 | $(WEBPACK) --mode production --env browser_target=chromium_mv3 --env canary |
| 43 | $(RELEASE_SCRIPT) -c canary -b chromium_mv3 -f |
| 44 | rm -rf dist/chromium_mv3 |
| 45 | |
Adrià Vilanova Martínez | 8b63fb3 | 2022-05-29 23:26:50 +0200 | [diff] [blame] | 46 | release_edge: deps |
| 47 | $(WEBPACK) --mode production --env browser_target=edge |
| 48 | $(RELEASE_SCRIPT) -c stable -b edge -f |
| 49 | rm -rf dist/edge |
| 50 | |
Adrià Vilanova Martínez | d4f82c5 | 2022-05-29 21:54:34 +0200 | [diff] [blame] | 51 | # Target to build the extension for webext lint in the Zuul Check Pipeline. |
| 52 | build_test_extension: deps |
Adrià Vilanova Martínez | b55b284 | 2024-05-28 19:28:49 +0200 | [diff] [blame^] | 53 | $(WEBPACK) --mode production --env browser_target=chromium_mv3 |
| 54 | $(RELEASE_SCRIPT) -c stable -b chromium_mv3 -f |
Adrià Vilanova Martínez | d4f82c5 | 2022-05-29 21:54:34 +0200 | [diff] [blame] | 55 | |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 56 | clean_releases: |
avm99963 | f01af0e | 2020-12-26 23:11:10 +0100 | [diff] [blame] | 57 | rm -rf out |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 58 | |
| 59 | clean: clean_deps clean_dist clean_releases |