From 00316a78a4150f4a239a0a656f5fdaed1e7b2fd1 Mon Sep 17 00:00:00 2001 From: The Noah Date: Thu, 21 Jan 2021 21:49:50 -0600 Subject: [PATCH] Add version --- .github/workflows/cd.yml | 2 +- README.md | 4 ++-- build.ts | 5 +++++ src/index.ejs | 10 ++++++++-- src/style.css | 4 ++++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8e9183c..3e9fce6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -26,7 +26,7 @@ jobs: deno-version: v1.x - name: Build 🧱 - run: deno run --unstable --allow-read --allow-write build.ts + run: deno run --unstable --allow-read --allow-write --allow-run build.ts - uses: actions/upload-artifact@v2 with: diff --git a/README.md b/README.md index f98bb5c..2b89c2b 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ The list of supported map features can be found in issue [#2](https://github.com > [Deno](https://deno.land/) v1.7.0+ is required to build the application. -`deno run --unstable --allow-read --allow-write build.ts` +`deno run --unstable --allow-read --allow-write --allow-run build.ts` -Or to run the live server with hot reloading: `deno run --unstable --allow-read --allow-write --allow-net build.ts serve` +Or to run the live server with hot reloading: `deno run --unstable --allow-read --allow-write --allow-net --allow-run build.ts serve` ## Contributing diff --git a/build.ts b/build.ts index 8f890ff..2113a4d 100644 --- a/build.ts +++ b/build.ts @@ -51,7 +51,12 @@ async function build(): Promise{ await loadJS(); } + const versionProcess = Deno.run({cmd: ["git", "describe", "--tags"], stdout: "piped", stderr: "piped"}); + const version = new TextDecoder().decode(await versionProcess.output()); + versionProcess.close(); + return await renderToString(template, { + version, css, js }); diff --git a/src/index.ejs b/src/index.ejs index 259d4e5..3fc4a61 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -62,6 +62,13 @@ +
+ Help + +
@@ -80,9 +87,8 @@ - Report a Bug GitHub - Copyright © 2020-2021 The Noah + Copyright © 2021 The Noah diff --git a/src/style.css b/src/style.css index ea43785..2decbc0 100644 --- a/src/style.css +++ b/src/style.css @@ -139,6 +139,10 @@ nav input[type=checkbox]{ margin-right: .5rem; } +nav a{ + text-decoration: none; +} + nav > div{ font-size: .9rem; user-select: none;