BREAKING CHANGE(szci): Rename project from npmci to szci and migrate runtime to Deno; add compiled binaries, installer and wrapper; update imports, env handling and package metadata
This commit is contained in:
23
ts/szci.classes.szcienv.ts
Normal file
23
ts/szci.classes.szcienv.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user