Skip to content

Commit

Permalink
Updates to publish 3.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Clint Priest committed Dec 10, 2018
1 parent 9debd11 commit b27c7b6
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 391 deletions.
41 changes: 29 additions & 12 deletions gulpfile.js
Expand Up @@ -44,8 +44,8 @@ function exec(cmd, options = execDefaultOpts) {
return cp.spawn('cmd.exe', ['/A', '/D', '/C', cmd], options);
}

const TaskGlobs = new Map(),
SpecialGlobs = new Map();
const TaskGlobs = new Map(),
SpecialGlobs = new Map();

TaskGlobs.set('', [
'LICENSE',
Expand Down Expand Up @@ -98,7 +98,7 @@ function buildTmp() {
);
}

let webext = (cmd, data) => `web-ext ${cmd} -s ${data.BuildPath} -a ${data.ArtifactsPath} -o`;
let webext = (cmd, data) => `web-ext ${cmd} -s ${data.BuildPath} -a ${data.ArtifactsPath} `;

function buildFor({ BuildPath, BuildData }) {
del(BuildPath);
Expand All @@ -125,9 +125,14 @@ function buildFor({ BuildPath, BuildData }) {

function buildChrome() { return buildFor(Chrome); }

gulp.task('chrome:package', series(buildChrome, () => {
return exec(webext('build', Chrome));
}));
let PackageChrome = series(buildChrome, () => {
return exec(webext('build --overwrite-dest', Chrome));
});

let PublishChrome = series(PackageChrome, (done) => {
console.warn('Chrome Publishing is not yet supported.');
done();
});

/*************************************************************************************************
* Firefox Building Tasks
Expand All @@ -136,13 +141,13 @@ gulp.task('chrome:package', series(buildChrome, () => {
function buildFirefox() { return buildFor(FireFox); }

let PackageFirefox = series(buildFirefox, () => {
return exec(webext('build', FireFox));
return exec(webext('build --overwrite-dest', FireFox));
});

/**
* NOTE: Using the web-ext sign will automatically upload for submission to AMO
*/
let SignFirefox = series(PackageFirefox, () => {
let PublishFirefox = series(PackageFirefox, () => {
let SecureDataFilepath = './insecure/Firefox/api-key.json';

if(!fs.existsSync(SecureDataFilepath)) {
Expand All @@ -162,7 +167,19 @@ let LintFirefox = series(buildFirefox, () => {
* Main Build Tasks
************************************************************************************************/

module.exports.default = series(
buildTmp,
parallel(buildChrome, buildFirefox)
);
module.exports = {
default: series(
buildTmp,
parallel(buildChrome, buildFirefox)
),

package: series(
buildTmp,
parallel(PackageFirefox, PackageChrome)
),

publish: series(
buildTmp,
parallel(PublishFirefox, PublishChrome)
)
};
29 changes: 15 additions & 14 deletions package.json
@@ -1,18 +1,18 @@
{
"name": "snaplinks3",
"FullName": "Snap Links",
"name": "snaplinks3",
"FullName": "Snap Links",
"version": "3.1.5",
"description": "Select multiple links, checkboxes and other elements and act on them such as open them in new tabs or check/un-check them.",
"author": "Clint Priest",
"license": "MIT",
"homepage": "https://cpriest.github.com/SnapLinksPlus",
"repository": "https://github.com/cpriest/SnapLinksPlus",
"private": true,
"preferGlobal": false,
"dependencies": {
"description": "Select multiple links, checkboxes and other elements and act on them such as open them in new tabs or check/un-check them.",
"author": "Clint Priest",
"license": "MIT",
"homepage": "https://cpriest.github.com/SnapLinksPlus",
"repository": "https://github.com/cpriest/SnapLinksPlus",
"private": true,
"preferGlobal": false,
"dependencies": {
"js-csp": "^1.0.1"
},
"devDependencies": {
"devDependencies": {
"@types/jest": "^23.3.9",
"crx": "^3.2.1",
"del": "^3.0.0",
Expand All @@ -28,15 +28,16 @@
"gulp-zip": "^4.1.0",
"merge-stream": "^1.0.1",
"run-sequence": "^2.2.1",
"web-ext": "^2.4.0",
"web-ext": "^2.9.2",
"webextension-polyfill": "^0.3.1"
},
"scripts": {
"build": "gulp",
"test": "jest"
},
"peerDependencies": {
"gulp": "4",
"jest": "^23.6.0"
"@babel/core": "^7",
"gulp": "4",
"jest": "^23.6.0"
}
}

0 comments on commit b27c7b6

Please sign in to comment.