build: build stable and beta channels with MV3
Manifest Version 2 will be deprecated in June 2024 in Chrome. This CL
switches the build system to release the beta and stable Chrome builds
with a MV3 build instead of a MV2 one.
It also removes the |web-ext lint| check in the lint job because
Chrome's MV3 builds are quite different from Firefox's MV3 builds (which
the extension doesn't provide) and this makes the |web-ext lint| check
fail. The lint job now only checks that the extension can be built.
Fixed: translateselectedtext:4
Change-Id: I2e0645aa1eac73b9e8bc7e7a551a625497127722
diff --git a/.zuul.yaml b/.zuul.yaml
index 4de214c..2546b24 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -8,9 +8,11 @@
- job:
name: translateselectedtext-lint
- parent: web-ext-lint
+ parent: base
pre-run: playbooks/lint/pre.yaml
run: playbooks/lint/run.yaml
+ roles:
+ - zuul: zuul/jobs
irrelevant-files:
- ".github/.*"
- "docs/.*"
diff --git a/Makefile b/Makefile
index 3ae08af..e0c4470 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: node_deps clean_dist deps clean_deps serve_chromium 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
+.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
.DEFAULT_GOAL := release
WEBPACK := ./node_modules/webpack-cli/bin/cli.js
@@ -17,9 +17,6 @@
rm -rf node_modules
-serve_chromium: deps
- $(WEBPACK) --mode development --env browser_target=chromium --watch
-
serve_chromium_mv3: deps
$(WEBPACK) --mode development --env browser_target=chromium_mv3 --watch
@@ -32,14 +29,14 @@
release: release_chromium_stable release_chromium_beta release_edge
release_chromium_stable: deps
- $(WEBPACK) --mode production --env browser_target=chromium
- $(RELEASE_SCRIPT) -c stable -b chromium -f
- rm -rf dist/chromium
+ $(WEBPACK) --mode production --env browser_target=chromium_mv3
+ $(RELEASE_SCRIPT) -c stable -b chromium_mv3 -f
+ rm -rf dist/chromium_mv3
release_chromium_beta: deps
- $(WEBPACK) --mode production --env browser_target=chromium
- $(RELEASE_SCRIPT) -c beta -b chromium -f
- rm -rf dist/chromium
+ $(WEBPACK) --mode production --env browser_target=chromium_mv3
+ $(RELEASE_SCRIPT) -c beta -b chromium_mv3 -f
+ rm -rf dist/chromium_mv3
release_chromium_canary: deps
$(WEBPACK) --mode production --env browser_target=chromium_mv3 --env canary
@@ -53,8 +50,8 @@
# Target to build the extension for webext lint in the Zuul Check Pipeline.
build_test_extension: deps
- $(WEBPACK) --mode production --env browser_target=chromium
- $(RELEASE_SCRIPT) -c stable -b chromium -f
+ $(WEBPACK) --mode production --env browser_target=chromium_mv3
+ $(RELEASE_SCRIPT) -c stable -b chromium_mv3 -f
clean_releases:
rm -rf out
diff --git a/playbooks/lint/run.yaml b/playbooks/lint/run.yaml
index 19b282e..c562300 100644
--- a/playbooks/lint/run.yaml
+++ b/playbooks/lint/run.yaml
@@ -2,5 +2,3 @@
roles:
- role: build-extension
make_target: build_test_extension
- - role: web-ext-lint
- source_dir: "dist/chromium"
diff --git a/tools/release.bash b/tools/release.bash
index d5f634d..dbe6d39 100644
--- a/tools/release.bash
+++ b/tools/release.bash
@@ -16,7 +16,6 @@
"stable" or "canary". Defaults to "stable".
-b, --browser indicates the target browser for the release. Can be
"chromium", "chromium_mv3, "edge" or "edge_mv3".
- Defaults to "chromium".
-f, --fast indicates that the release shouldn't generate the
i18n credits JSON file.
@@ -33,7 +32,7 @@
eval set -- "$opts"
channel=stable
-browser=chromium
+browser=
fast=0
while true; do