Compare commits

...

4 Commits

Author SHA1 Message Date
77b8e9e368 output sqlite3
All checks were successful
Release / build (push) Successful in 34s
Integration / Validate (push) Successful in 7s
2024-09-26 03:13:40 +02:00
18eb34c1ea dont commit build
All checks were successful
Integration / Validate (push) Successful in 7s
2024-09-26 02:58:49 +02:00
c683d5d254 add on commit build
Some checks failed
Integration / Validate (push) Successful in 9s
Integration / Build latest (push) Failing after 28s
2024-09-26 02:55:03 +02:00
1d9eb32901 remove comment 2024-09-26 02:52:36 +02:00
3 changed files with 10 additions and 9 deletions

View File

@ -6,6 +6,7 @@ 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

View File

@ -27,12 +27,6 @@ jobs:
- name: Compile - name: Compile
run: "deno task compile" run: "deno task compile"
# - name: Upload Artifact
# uses: "https://gitea.com/actions/upload-artifact@v3"
# with:
# name: bunker-artifact
# path: bunker
#
- name: Release - name: Release
id: use-go-action id: use-go-action
uses: "https://gitea.com/actions/release-action@main" uses: "https://gitea.com/actions/release-action@main"

12
main.ts
View File

@ -27,14 +27,20 @@ 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",
}); });
console.log( const cmdChild = cmd.spawn();
await cmd.output().then((out) => new TextDecoder().decode(out.stdout)), cmdChild.stdout.pipeTo(Deno.stdout.writable);
); 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 {