mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
0180896459
Vencord can be built in two different ways. Either as a web-extension, or as a set of scripts to be injected into Discord Desktop. Allow to select between these two modes using a parameter and expose both variants as top-level packages. This also renames vencord-web-extension to vencord. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
|
|
index 7ff599a..85b3bfa 100644
|
|
--- a/scripts/build/common.mjs
|
|
+++ b/scripts/build/common.mjs
|
|
@@ -24,7 +24,7 @@ import { promisify } from "util";
|
|
|
|
export const watch = process.argv.includes("--watch");
|
|
export const isStandalone = JSON.stringify(process.argv.includes("--standalone"));
|
|
-export const gitHash = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();
|
|
+export const gitHash = "@version@";
|
|
export const banner = {
|
|
js: `
|
|
// Vencord ${gitHash}
|
|
@@ -124,11 +124,7 @@ export const gitRemotePlugin = {
|
|
namespace: "git-remote", path: args.path
|
|
}));
|
|
build.onLoad({ filter, namespace: "git-remote" }, async () => {
|
|
- const res = await promisify(exec)("git remote get-url origin", { encoding: "utf-8" });
|
|
- const remote = res.stdout.trim()
|
|
- .replace("https://github.com/", "")
|
|
- .replace("git@github.com:", "")
|
|
- .replace(/.git$/, "");
|
|
+ const remote = "Vendicated/Vencord";
|
|
|
|
return { contents: `export default "${remote}"` };
|
|
});
|