Skip to content

Commit

Permalink
Update utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaray committed Nov 30, 2024
1 parent 574174d commit 4165db9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { repoOwner, repoName } from "./constants";

export const runtime: "bun" | "deno" | undefined = typeof Bun !== "undefined"
? "bun"
: typeof Deno !== "undefined"
Expand Down Expand Up @@ -108,3 +110,7 @@ export async function getBranchName() {
// There is a newline at the end, I will use backslash to split the string
return branchName.output.split("\\")[0];
}

export function pvsUrl(ui: any, branch: string, filename: string) {
return `https://raw.githubusercontent.com/${repoOwner}/${repoName}/refs/heads/${branch}/scripts/${ui.id}/${filename}.sh`;
}

0 comments on commit 4165db9

Please sign in to comment.