Harshith Mullapudi 6e308408be
Feat: cli for core (#24)
* 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>
2025-07-18 22:30:46 +05:30

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")
);
}