Compare commits
No commits in common. "main" and "v0.0.12" have entirely different histories.
@ -6,7 +6,6 @@ on:
|
|||||||
branches: main
|
branches: main
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
name: Validate
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # Needed to clone the repository
|
contents: read # Needed to clone the repository
|
||||||
|
@ -11,27 +11,27 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install Deno
|
- name: Install Deno
|
||||||
uses: denoland/setup-deno@v1
|
uses: denoland/setup-deno@v1
|
||||||
with:
|
with:
|
||||||
deno-version: v1.x
|
deno-version: v1.x
|
||||||
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '>=1.20.1'
|
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: "deno task compile"
|
run: "deno task compile"
|
||||||
|
|
||||||
- name: Release
|
- name: Test ls
|
||||||
id: use-go-action
|
run: "ls"
|
||||||
uses: "https://gitea.com/actions/release-action@main"
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: "https://gitea.com/actions/upload-artifact@v3"
|
||||||
with:
|
with:
|
||||||
files: "bunker"
|
name: bunker-artifact
|
||||||
api_key: '${{secrets.GITEA_TOKEN}}'
|
path: bunker
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: "bunker"
|
||||||
|
|
||||||
|
|
||||||
|
12
main.ts
12
main.ts
@ -27,20 +27,14 @@ try {
|
|||||||
if (!(error instanceof Deno.errors.NotFound)) {
|
if (!(error instanceof Deno.errors.NotFound)) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
console.log("'bunker.db' not found, creating...");
|
|
||||||
const cmd = new Deno.Command("sqlite3", {
|
const cmd = new Deno.Command("sqlite3", {
|
||||||
args: ["bunker.db", ".read database.sql"],
|
args: ["bunker.db", ".read database.sql"],
|
||||||
stdout: "piped",
|
stdout: "piped",
|
||||||
stderr: "piped",
|
stderr: "piped",
|
||||||
});
|
});
|
||||||
const cmdChild = cmd.spawn();
|
console.log(
|
||||||
cmdChild.stdout.pipeTo(Deno.stdout.writable);
|
await cmd.output().then((out) => new TextDecoder().decode(out.stdout)),
|
||||||
cmdChild.stderr.pipeTo(Deno.stderr.writable);
|
);
|
||||||
const status = await cmdChild.status;
|
|
||||||
if (!status.success) {
|
|
||||||
console.log("failed creating 'bunker.db', exiting...");
|
|
||||||
Deno.exit(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SqliteDb implements Db {
|
class SqliteDb implements Db {
|
||||||
|
Loading…
Reference in New Issue
Block a user