import { spawn, which } from "bun"; import { rmSync } from "fs"; import { basename } from "path"; const repo = process.argv.at(3) || "TheoBr/vercel-vite-demo"; const target = basename(repo) + "-main"; console.log("Downloading", repo, "to", "/tmp/" + target); const archive = await fetch( `https://github.com/${repo}/archive/refs/heads/main.tar.gz`, ); // remove the directory if it already exists locally rmSync("/tmp/" + target, { recursive: true, force: true }); const tar = spawn({ cmd: ["tar", "-xzf", "-"], stdin: archive.body, stderr: "inherit", stdout: "inherit", cwd: "/tmp", }); await tar.exited; // if vercel isn't installed, install it if (!which("vercel")) { console.log("Installing vercel..."); const installer = spawn(["bun", "install", "-g", "vercel"], { stderr: "inherit", stdout: "inherit", stdin: "inherit", }); await installer.exited; if (!which("vercel")) { throw new Error("Failed to install Vercel CLI"); } } const { exited: deployed } = spawn({ cmd: ["vercel", "deploy", "--yes", "--public", target], stdio: ["inherit", "inherit", "inherit"], cwd: "/tmp", }); await deployed; .25.10 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/plugin/header (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-09-17plugin/view : fix README (#5627)Gravatar Ondřej Benkovský 1-1/+1
2022-09-15plugin/template: fix formatting with go fmt (#5622)Gravatar Erik Johansson 2-5/+5
2022-09-15plugin/template: Add parseInt template function (#5609)Gravatar Erik Johansson 5-20/+116
2022-09-15Revert "build(deps): bump ossf/scorecard-action from 1.1.2 to 2.0.2 (#5613)" ...Gravatar Chris O'Haver 1-1/+1
2022-09-15plugin/template : add view label into plugin metrics (#5620)Gravatar Ondřej Benkovský 3-13/+13
2022-09-14plugin/prometheuss : make plugin enabled metric view aware (#5618)Gravatar Ondřej Benkovský 3-4/+4
2022-09-13Update coredns-1.9.4.mdGravatar Chris O'Haver 1-1/+1
2022-09-13auto go mod tidyGravatar coredns[bot] 1-23/+0
2022-09-12plugin/acl : add view label into metrics (#5615)Gravatar Ondřej Benkovský 3-8/+10
2022-09-12build(deps): bump github.com/aws/aws-sdk-go from 1.44.91 to 1.44.95 (#5612)Gravatar dependabot[bot] 2-3/+3
2022-09-12build(deps): bump google.golang.org/api from 0.94.0 to 0.95.0 (#5611)Gravatar dependabot[bot] 2-3/+3
2022-09-12build(deps): bump ossf/scorecard-action from 1.1.2 to 2.0.2 (#5613)Gravatar dependabot[bot] 1-1/+1
2022-09-12build(deps): bump k8s.io/klog/v2 from 2.80.0 to 2.80.1 (#5610)Gravatar dependabot[bot] 2-3/+26
2022-09-12auto go fmtGravatar coredns[bot] 1-2/+2