import * as plugins from './szci.plugins.ts'; import { Szci } from './szci.classes.szci.ts'; export class SzciEnv { public szciRef: Szci; public repoString: string; public repo: plugins.smartstring.GitRepo; constructor(szciRefArg: Szci) { this.szciRef = szciRefArg; // Determine repo string from environment let repoUrl: string | undefined; if (Deno.env.get("GITLAB_CI")) { repoUrl = Deno.env.get("CI_REPOSITORY_URL"); } if (!repoUrl && Deno.env.get("SZCI_COMPUTED_REPOURL")) { repoUrl = Deno.env.get("SZCI_COMPUTED_REPOURL"); } this.repoString = repoUrl || 'https://undefined:undefined@github.com/undefined/undefined.git'; this.repo = new plugins.smartstring.GitRepo(this.repoString); } }