Separate testing and nightly

This commit is contained in:
Tamius Han 2019-12-03 02:01:29 +01:00
parent bd38e28610
commit 30d6338d76
3 changed files with 19 additions and 1 deletions

View File

@ -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",

View File

@ -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

View File

@ -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;
}