Compare commits

..

No commits in common. "main" and "v0.0.17" have entirely different histories.

3 changed files with 9 additions and 10 deletions

View File

@ -6,7 +6,6 @@ on:
branches: main
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
permissions:
contents: read # Needed to clone the repository

View File

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

12
main.ts
View File

@ -27,20 +27,14 @@ try {
if (!(error instanceof Deno.errors.NotFound)) {
throw error;
}
console.log("'bunker.db' not found, creating...");
const cmd = new Deno.Command("sqlite3", {
args: ["bunker.db", ".read database.sql"],
stdout: "piped",
stderr: "piped",
});
const cmdChild = cmd.spawn();
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);
}
console.log(
await cmd.output().then((out) => new TextDecoder().decode(out.stdout)),
);
}
class SqliteDb implements Db {