aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.earthlyignore3
-rw-r--r--Earthfile10
-rw-r--r--src/routes/settings/+page.svelte3
3 files changed, 13 insertions, 3 deletions
diff --git a/.earthlyignore b/.earthlyignore
index 7936b20e..75846ced 100644
--- a/.earthlyignore
+++ b/.earthlyignore
@@ -11,4 +11,5 @@
!.eslintignore
!.eslintrc.cjs
!.prettierignore
-!.prettierrc \ No newline at end of file
+!.prettierrc
+!.git
diff --git a/Earthfile b/Earthfile
index 6d4e33fe..830ffd31 100644
--- a/Earthfile
+++ b/Earthfile
@@ -5,8 +5,12 @@ FROM oven/bun:1.0.15-alpine
WORKDIR /due
all:
+ RUN apk add --update --no-cache git
+
+ COPY .git .git
+
BUILD +lint
- BUILD +docker
+ BUILD +docker --GIT_SHORT_SHA=$(git rev-parse --short HEAD)
BUILD +git
dev:
@@ -27,8 +31,12 @@ lint:
RUN bun --bun run check
docker:
+ ARG GIT_SHORT_SHA
+
COPY +build/build .
+ RUN echo "PUBLIC_GIT_SHORT_SHA=$GIT_SHORT_SHA" > .env
+
CMD ["bun", "--bun", "./index.js"]
SAVE IMAGE --push fuwn/due-next:latest
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index e13ec548..a7db1390 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -6,6 +6,7 @@
import SettingHint from '$lib/Settings/SettingHint.svelte';
import { pruneAllManga } from '$lib/Media/manga';
import Attributions from '$lib/Settings/Attributions.svelte';
+ import { env } from '$env/dynamic/public';
export let data;
@@ -263,7 +264,7 @@
<p />
<details open>
- <summary>Reset Settings</summary>
+ <summary>Debug <small style="opacity: 50%;">{env.PUBLIC_GIT_SHORT_SHA}</small></summary>
<a href={'#'} on:click={settings.reset}>Reset <b>ALL</b> settings</a>
<SettingHint lineBreak>