Remove browser_specific_settings from Chrome build + GitHub actions fixes
parent
c1f0ce6eae
commit
f29b120f7b
|
|
@ -14,12 +14,14 @@ runs:
|
||||||
- name: Determine Version
|
- name: Determine Version
|
||||||
uses: gittools/actions/gitversion/execute@v0
|
uses: gittools/actions/gitversion/execute@v0
|
||||||
id: version
|
id: version
|
||||||
|
with:
|
||||||
|
useConfigFile: true
|
||||||
|
|
||||||
- name: Use the version
|
- name: Use the version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo SZ_VERSION="${{ steps.version.outputs.AssemblySemFileVer }}" >> $GITHUB_ENV
|
echo VITE_SZ_VERSION="${{ steps.version.outputs.AssemblySemFileVer }}" >> $GITHUB_ENV
|
||||||
echo SZ_VERSION_NAME="${{ steps.version.outputs.InformationalVersion }}" >> $GITHUB_ENV
|
echo VITE_SZ_VERSION_INFO="${{ steps.version.outputs.InformationalVersion }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,11 @@ const storageLocal: StorageLikeAsync = {
|
||||||
},
|
},
|
||||||
|
|
||||||
setItem(key: string, value: string) {
|
setItem(key: string, value: string) {
|
||||||
console.log("setItem");
|
|
||||||
console.dir(value);
|
|
||||||
return storage.local.set({ [key]: value });
|
return storage.local.set({ [key]: value });
|
||||||
},
|
},
|
||||||
|
|
||||||
async getItem(key: string) {
|
async getItem(key: string) {
|
||||||
console.log("getItem");
|
|
||||||
const item = (await storage.local.get(key))[key];
|
const item = (await storage.local.get(key))[key];
|
||||||
console.dir(item);
|
|
||||||
return item;
|
return item;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export async function getManifest() {
|
||||||
const manifest: Manifest.WebExtensionManifest = {
|
const manifest: Manifest.WebExtensionManifest = {
|
||||||
name: pkg.displayName,
|
name: pkg.displayName,
|
||||||
description: pkg.description,
|
description: pkg.description,
|
||||||
version: process.env.SZ_VERSION || pkg.version,
|
version: process.env.VITE_SZ_VERSION || pkg.version,
|
||||||
manifest_version: 2,
|
manifest_version: 2,
|
||||||
icons: {
|
icons: {
|
||||||
16: "./assets/icon-128.png",
|
16: "./assets/icon-128.png",
|
||||||
|
|
@ -38,12 +38,15 @@ export async function getManifest() {
|
||||||
js: ["./dist/contentScripts/index.global.js"],
|
js: ["./dist/contentScripts/index.global.js"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
browser_specific_settings: {
|
};
|
||||||
|
|
||||||
|
if (process.env.SZ_GECKO_ID) {
|
||||||
|
manifest.browser_specific_settings = {
|
||||||
gecko: {
|
gecko: {
|
||||||
id: "{13372607-2257-4360-8f51-5ce66fa73350}",
|
id: process.env.SZ_GECKO_ID,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
// for content script, as browsers will cache them for each reload,
|
// for content script, as browsers will cache them for each reload,
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,11 @@ import { SzuruSiteConfig } from "~/config";
|
||||||
import { cfg } from "~/stores";
|
import { cfg } from "~/stores";
|
||||||
import { getErrorMessage } from "~/utils";
|
import { getErrorMessage } from "~/utils";
|
||||||
|
|
||||||
let statusText = ref("Version " + browser.runtime.getManifest().version);
|
const statusText = ref("Version " + browser.runtime.getManifest().version);
|
||||||
let statusType = ref("status-quiet");
|
const statusType = ref("status-quiet");
|
||||||
|
const versionInfo = import.meta.env.VITE_SZ_VERSION_INFO ?? "info not available";
|
||||||
|
|
||||||
|
console.log("Version: " + versionInfo);
|
||||||
|
|
||||||
const selectedSite = computed(() => {
|
const selectedSite = computed(() => {
|
||||||
if (cfg.value.selectedSiteId) {
|
if (cfg.value.selectedSiteId) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue