feat: add About well to settings with build info and debug easter egg #145

Open
clawbot wants to merge 7 commits from feat/issue-144-settings-about into main
4 changed files with 16 additions and 29 deletions
Showing only changes of commit be38ce081e - Show all commits

View File

@@ -1,4 +1,3 @@
.git
node_modules
.DS_Store
dist

View File

@@ -1,7 +1,7 @@
# node:22-slim (22.x LTS), 2026-02-24
FROM node@sha256:5373f1906319b3a1f291da5d102f4ce5c77ccbe29eb637f072b6c7b70443fc36
RUN apt-get update && apt-get install -y --no-install-recommends make && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends make git && rm -rf /var/lib/apt/lists/*
RUN corepack enable && corepack prepare yarn@1.22.22 --activate
WORKDIR /app
@@ -11,10 +11,5 @@ RUN yarn install --frozen-lockfile
COPY . .
ARG GIT_COMMIT_SHORT=unknown
ARG GIT_COMMIT_FULL=unknown
ENV GIT_COMMIT_SHORT=${GIT_COMMIT_SHORT}
ENV GIT_COMMIT_FULL=${GIT_COMMIT_FULL}
RUN make check
RUN make build

View File

@@ -33,10 +33,7 @@ dev:
@yarn run build --watch 2>&1
docker:
@docker build \
--build-arg GIT_COMMIT_SHORT=$$(git rev-parse --short HEAD 2>/dev/null || echo unknown) \
--build-arg GIT_COMMIT_FULL=$$(git rev-parse HEAD 2>/dev/null || echo unknown) \
-t autistmask .
@docker build -t autistmask .
hooks:
@echo "Installing pre-commit hook..."

View File

@@ -15,8 +15,7 @@ function getBuildInfo() {
const pkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "package.json"), "utf8"),
);
let commitHash = process.env.GIT_COMMIT_SHORT || "unknown";
if (commitHash === "unknown") {
let commitHash = "unknown";
try {
commitHash = execSync("git rev-parse --short HEAD", {
encoding: "utf8",
@@ -24,9 +23,7 @@ function getBuildInfo() {
} catch (_) {
// not a git repo or git not available
}
}
let commitHashFull = process.env.GIT_COMMIT_FULL || "unknown";
if (commitHashFull === "unknown") {
let commitHashFull = "unknown";
try {
commitHashFull = execSync("git rev-parse HEAD", {
encoding: "utf8",
@@ -34,7 +31,6 @@ function getBuildInfo() {
} catch (_) {
// not a git repo or git not available
}
}
return {
version: pkg.version,
license: pkg.license,