mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 21:48:36 +00:00
* Feat: cli for cor * Fix: add deploy registry namespace to Docker configurations * Feat: cli for init, start and stop --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
23 lines
599 B
TypeScript
23 lines
599 B
TypeScript
import { execSync } from "child_process";
|
|
|
|
export function getGitRemoteUrl(): string | null {
|
|
try {
|
|
const url = execSync("git config --get remote.origin.url", { encoding: "utf8" }).trim();
|
|
return url;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export function isValidCoreRepo(): boolean {
|
|
const remoteUrl = getGitRemoteUrl();
|
|
if (!remoteUrl) return false;
|
|
|
|
return (
|
|
remoteUrl.includes("github.com/redplanethq/core") ||
|
|
remoteUrl.includes("github.com:redplanethq/core") ||
|
|
remoteUrl.includes("github.com/tegonhq/echo") ||
|
|
remoteUrl.includes("github.com:tegonhq/echo")
|
|
);
|
|
}
|