Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/1093: Extension - Allow specifying beta extension build #1094

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"clean:firefox": "rimraf ./build/firefox",
"build": "yarn wasm:build && yarn clean && yarn build:chrome && yarn build:firefox",
"build:chrome": "yarn clean:chrome && NODE_ENV=production TARGET=chrome webpack-cli && yarn run web-ext build --s ./build/chrome -a ./build/chrome",
"build:chrome:beta": "yarn clean:chrome && NODE_ENV=production BETA_RELEASE=true TARGET=chrome webpack-cli && yarn run web-ext build --s ./build/chrome -a ./build/chrome",
"build:firefox": "yarn clean:firefox && NODE_ENV=production TARGET=firefox webpack-cli && yarn run web-ext build --s ./build/firefox -a ./build/firefox",
"build:firefox:beta": "yarn clean:firefox && NODE_ENV=production BETA_RELEASE=true TARGET=firefox webpack-cli && yarn run web-ext build --s ./build/firefox -a ./build/firefox",
"lint": "eslint src --ext .ts,.tsx",
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0",
Expand Down
5 changes: 4 additions & 1 deletion apps/extension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { getProcessEnv } = require("@namada/config/webpack.js");
// Load .env from namadillo:
require("dotenv").config({ path: "./.env" });

const { NODE_ENV, TARGET, BUNDLE_ANALYZE } = process.env;
const { NODE_ENV, TARGET, BUNDLE_ANALYZE, BETA_RELEASE: isBeta } = process.env;

const OUTPUT_PATH = resolve(__dirname, `./build/${TARGET}`);
const MANIFEST_VERSION = TARGET === "firefox" ? "v2" : "v3";
Expand All @@ -27,6 +27,9 @@ const GENERATED_MANIFEST = "generatedManifest.json";
function generateManifest(buffer) {
const manifest = JSON.parse(buffer.toString());

manifest.name = `${manifest.name}${isBeta ? " BETA" : ""}`;
manifest.description =
isBeta ? "THIS EXTENSION IS FOR BETA TESTING" : manifest.description;
manifest.version = packageJson.version;

return JSON.stringify(manifest, null, 2);
Expand Down
Loading