Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 1 | .PHONY: node_deps clean_dist deps clean_deps serve_chromium release release_chromium_stable release_chromium_beta 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 | |
| 20 | serve_chromium: deps |
| 21 | $(WEBPACK) --mode development --env browser_target=chromium --watch |
| 22 | |
| 23 | release: release_chromium_stable release_chromium_beta |
| 24 | |
| 25 | release_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 | |
| 30 | release_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 | |
| 35 | clean_releases: |
avm99963 | f01af0e | 2020-12-26 23:11:10 +0100 | [diff] [blame] | 36 | rm -rf out |
Adrià Vilanova Martínez | a197d86 | 2022-05-27 17:33:20 +0200 | [diff] [blame] | 37 | |
| 38 | clean: clean_deps clean_dist clean_releases |