Skip to content

Commit 9c1a266

Browse files
committed
Merge pull request AdguardTeam#593 in EXTENSIONS/browser-extension from feature/AG-1193-2 to master
* commit 'ac79c6725eda8d2951c41914c11cc73ae1e17fd8': AG-1193 fix dev build
2 parents 4d536c0 + ac79c67 commit 9c1a266

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

tasks/browser-firefox-amo.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,18 @@ const dest = {
5555
const copyCommon = () => copyCommonFiles(paths.dest);
5656

5757
// copy firefox filters
58-
const copyFilters = () => gulp.src(paths.filters).pipe(gulp.dest(dest.filters));
58+
const copyFilters = () => gulp.src(paths.filters)
59+
.pipe(gulp.dest(dest.filters));
5960

6061
// copy chromium, webkit files and firefox_webext files
6162
const firefoxWebext = () => gulp.src([paths.webkitFiles, paths.chromeFiles, paths.firefox_webext])
6263
.pipe(gulp.dest(paths.dest));
6364

6465
// preprocess with params
65-
const preprocess = done => preprocessAll(paths.dest, { browser: FIREFOX_WEBEXT, remoteScripts: false }, done);
66+
const preprocess = done => preprocessAll(paths.dest, {
67+
browser: FIREFOX_WEBEXT,
68+
remoteScripts: false,
69+
}, done);
6670

6771
// change the extension name based on a type of a build (dev, beta or release)
6872
const localesProcess = done => updateLocalesMSGName(BRANCH, paths.dest, done, FIREFOX_WEBEXT);
@@ -92,9 +96,14 @@ const updateManifest = (done) => {
9296
return done();
9397
};
9498

95-
const createArtifactBuild = () => gulp.src(dest.inner)
96-
.pipe(zip('firefox.zip'))
97-
.pipe(gulp.dest(BUILD_DIR));
99+
const createArtifactBuild = (done) => {
100+
if (BRANCH !== BRANCH_BETA && BRANCH !== BRANCH_RELEASE) {
101+
return done();
102+
}
103+
return gulp.src(dest.inner)
104+
.pipe(zip('firefox.zip'))
105+
.pipe(gulp.dest(BUILD_DIR));
106+
};
98107

99108
const createWebExt = (done) => {
100109
if (BRANCH !== BRANCH_BETA && BRANCH !== BRANCH_RELEASE) {

tasks/browser-firefox-webext.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ const updateManifest = (done) => {
9393
};
9494

9595
const createUpdateJson = async (done) => {
96+
if (BRANCH !== BRANCH_BETA && BRANCH !== BRANCH_RELEASE) {
97+
return done();
98+
}
9699
const templatePath = path.resolve(__dirname, './resources/firefox_updates.json');
97100
let updateJsonTemplate = (await fs.promises.readFile(templatePath)).toString();
98101
updateJsonTemplate = updateJsonTemplate.replace(/\%VERSION\%/g, version);
@@ -101,6 +104,9 @@ const createUpdateJson = async (done) => {
101104
};
102105

103106
const createArtifact = async (done) => {
107+
if (BRANCH !== BRANCH_BETA && BRANCH !== BRANCH_RELEASE) {
108+
return done();
109+
}
104110
// eslint-disable-next-line global-require
105111
const credentialsPath = path.resolve(__dirname, '../private/AdguardBrowserExtension/mozilla_credentials.json');
106112
const { apiKey, apiSecret } = JSON.parse(await fs.promises.readFile(credentialsPath));

0 commit comments

Comments
 (0)