diff --git a/package.json b/package.json index 0f18671..7110c19 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "build-chrome": "cross-env NODE_ENV=production BROWSER=chrome webpack --hide-modules", "build-edge": "cross-env NODE_ENV=production BROWSER=edge webpack --hide-modules", "build:dev": "cross-env NODE_ENV=development BROWSER=firefox webpack --hide-modules", + "build-testing": "cross-env NODE_ENV=development BROWSER=firefox CHANNEL=testing webpack --hide-modules", "build-nightly": "cross-env NODE_ENV=development BROWSER=firefox CHANNEL=nightly webpack --hide-modules", + "build-testing-chrome": "cross-env NODE_ENV=development BROWSER=chrome CHANNEL=testing webpack --hide-modules", "build-nightly-chrome": "cross-env NODE_ENV=development BROWSER=chrome CHANNEL=nightly webpack --hide-modules", "build-chrome:dev": "cross-env NODE_ENV=development BROWSER=chrome webpack --hide-modules", "build-edge:dev": "cross-env NODE_ENV=development BROWSER=edge webpack --hide-modules", diff --git a/scripts/build-crx.sh b/scripts/build-crx.sh index 2b299a7..17ae75a 100755 --- a/scripts/build-crx.sh +++ b/scripts/build-crx.sh @@ -15,7 +15,7 @@ cd ./dist-zip zip=`ls | grep chrome.zip` name="${zip%.*}" crx="$name.crx" -key="../keys/chrome-nightly.pem" +key="../keys/chrome-nightly.pem" # this is also good for testing build pub="$name.pub" sig="$name.sig" trap 'rm -f "$pub" "$sig" "$zip"' EXIT diff --git a/webpack.config.js b/webpack.config.js index 474304c..8a92001 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -98,6 +98,22 @@ const config = { }.${process.env.BUILD_NUMBER}`; jsonContent.browser_action.default_title = "Ultrawidify Nightly"; + // otherwise things will get fun! + delete jsonContent.applications; + } else if (process.env.CHANNEL === 'testing') { + jsonContent.name = "Ultrawidify - testing"; + jsonContent.description = "FOR TESTING ONLY -- this build is intended for testing a fix of certain bugs. It's not fit for normal use."; + + // version numbers for nightly builds: YYMM.DD.BUILD_NUMBER + jsonContent.version = `${new Date() + .toISOString() // YYYY-MM-DDTHH:MM:SS... + .split('T')[0] // gives YYYY-MM-DD + .substr(2) // YYYY -> YY + .replace('-', '') // YY-MM-DD -> YYMM-DD + .replace('-', '.') // YYMM-DD -> YYMM.DD + }.${process.env.BUILD_NUMBER}`; + jsonContent.browser_action.default_title = "Ultrawidify Testing"; + // otherwise things will get fun! delete jsonContent.applications; }