24 lines
739 B
TypeScript
24 lines
739 B
TypeScript
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;
|
|
if (!this.repoString && Deno.env.get("GITLAB_CI")) {
|
|
this.repoString = Deno.env.get("CI_REPOSITORY_URL");
|
|
}
|
|
if (!this.repoString && Deno.env.get("NPMCI_COMPUTED_REPOURL")) {
|
|
this.repoString = Deno.env.get("NPMCI_COMPUTED_REPOURL");
|
|
}
|
|
if (!this.repoString) {
|
|
this.repoString = 'https://undefined:undefined@github.com/undefined/undefined.git';
|
|
}
|
|
this.repo = new plugins.smartstring.GitRepo(this.repoString);
|
|
}
|
|
}
|