Skip to content

Commit

Permalink
Versão 9.8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipePS committed May 6, 2023
1 parent 30484f6 commit c497d1e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
39 changes: 33 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ gulp.task("clean", (cb) => {
});

gulp.task("firefox-copy", () => {
return gulp.src(["src/**/**"]).pipe(gulp.dest(`build/${firefox_folder_name}`));
return gulp
.src(["src/**/**"])
.pipe(gulp.dest(`build/${firefox_folder_name}`));
});

gulp.task("firefox-babel", () => {
Expand Down Expand Up @@ -127,6 +129,30 @@ gulp.task("firefox-move-sourcemap", (cb) => {
});
});

gulp.task("firefox-self-hosted", (cb) => {
return new Promise((resolve, reject) => {
gulp
.src([`build/${firefox_folder_name}/**/**`])
.pipe(gulp.dest(`build/${firefox_folder_name}_selfhosted`))
.on("error", reject)
.on("end", resolve);
}).then(() => {
const manifest = JSON.parse(
fs.readFileSync(
`build/${firefox_folder_name}_selfhosted/manifest.json`,
"utf8"
)
);
manifest.browser_specific_settings.gecko.update_url =
"https://raw.githubusercontent.com/FilipePS/Traduzir-paginas-web/master/dist/firefox/updates.json";
fs.writeFileSync(
`build/${firefox_folder_name}_selfhosted/manifest.json`,
JSON.stringify(manifest, null, 4),
"utf8"
);
});
});

gulp.task("firefox-zip", () => {
return gulp
.src([`build/${firefox_folder_name}/**/*`])
Expand Down Expand Up @@ -163,11 +189,11 @@ gulp.task("chrome-sign", (cb) => {
const dialog = require("node-file-dialog");

if (process.argv[2] === "--sign") {
return dialog({type: "open-file"}).then((file) => {
return crx3([`build/${chromium_folder_name}/manifest.json`], {
keyPath: file[0],
crxPath: `build/${chromium_folder_name}.crx`,
})
return dialog({ type: "open-file" }).then((file) => {
return crx3([`build/${chromium_folder_name}/manifest.json`], {
keyPath: file[0],
crxPath: `build/${chromium_folder_name}.crx`,
});
});
} else {
cb();
Expand All @@ -180,6 +206,7 @@ gulp.task(
"firefox-copy",
"firefox-babel",
"firefox-move-sourcemap",
"firefox-self-hosted",
"firefox-zip"
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/chrome_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "TWP - Translate Web Pages",
"description": "__MSG_extensionDescription__",
"version": "9.8.0.0",
"version": "9.8.0.1",
"homepage_url": "https://github.com/FilipePS/Traduzir-paginas-web",
"update_url": "https://raw.githubusercontent.com/FilipePS/Traduzir-paginas-web/master/dist/chromium/updates.xml",
"commands": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "TWP - Translate Web Pages",
"description": "__MSG_extensionDescription__",
"version": "9.8.0.0",
"version": "9.8.0.1",
"homepage_url": "https://github.com/FilipePS/Traduzir-paginas-web",
"browser_specific_settings": {
"gecko": {
Expand Down

0 comments on commit c497d1e

Please sign in to comment.