From 44b667ff4322051019a90cd4b3d9a484734b87dc Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 30 Dec 2023 02:33:58 +0100 Subject: [PATCH] add frontend CI --- .woodpecker.yml | 16 ++++++++++++++++ Makefile | 2 +- frontend/svelte.config.js | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..5af005c --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,16 @@ +steps: + frontend: + image: node + directory: frontend + environment: # SvelteKit expects these in the environment during build time. + - PRIVATE_SENTRY_DSN=non_existent_dsn + - PUBLIC_BASE_URL=http://pronouns.localhost + - PUBLIC_MEDIA_URL=http://pronouns.localhost/media + - PUBLIC_SHORT_BASE=http://prns.localhost + - PUBLIC_HCAPTCHA_SITEKEY=non_existent_sitekey + commands: + - corepack enable + - pnpm install + - pnpm check + - pnpm lint + - pnpm build diff --git a/Makefile b/Makefile index 1b15eff..8a7c089 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: generate backend frontend .PHONY: backend backend: - go build -v -o pronouns -ldflags="-buildid= -X codeberg.org/pronounscc/pronouns.cc/backend/server.Revision=`git rev-parse --short HEAD` -X codeberg.org/pronounscc/pronouns.cc/backend/server.Tag=`git describe --tags --long`" . + go build -v -o pronouns -ldflags="-buildid= -X codeberg.org/pronounscc/pronouns.cc/backend/server.Revision=`git rev-parse --short HEAD` -X codeberg.org/pronounscc/pronouns.cc/backend/server.Tag=`git describe --tags --long --always`" . .PHONY: generate generate: diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index c9182bf..46d780b 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -11,7 +11,7 @@ const config = { kit: { adapter: adapter(), version: { - name: child_process.execSync("git describe --tags --long").toString().trim(), + name: child_process.execSync("git describe --tags --long --always").toString().trim(), }, }, };