mirror of
https://github.com/Luzifer/wiki.git
synced 2024-11-09 15:20:07 +00:00
CI: Build app code on-demand
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0b8a6e947c
commit
2ef54b4218
5 changed files with 21 additions and 258 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
data
|
data
|
||||||
|
frontend/app.css
|
||||||
|
frontend/app.js
|
||||||
node_modules
|
node_modules
|
||||||
wiki
|
wiki
|
||||||
|
|
|
@ -7,6 +7,10 @@ RUN set -ex \
|
||||||
&& apk --no-cache add \
|
&& apk --no-cache add \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
make \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
&& make frontend \
|
||||||
&& go build \
|
&& go build \
|
||||||
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
||||||
-mod=readonly \
|
-mod=readonly \
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -1,8 +1,18 @@
|
||||||
default: generate
|
VERSION := $(shell git describe --tags --always || echo dev)
|
||||||
|
|
||||||
generate:
|
default: build
|
||||||
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR)/src node:alpine \
|
|
||||||
sh -exc "npm ci && node ci/build.mjs && chown -R $(shell id -u) ../frontend node_modules"
|
|
||||||
|
|
||||||
publish:
|
build: frontend
|
||||||
|
go build \
|
||||||
|
-ldflags "-s -w -X main.version=$(version)" \
|
||||||
|
-mod=readonly \
|
||||||
|
-trimpath
|
||||||
|
|
||||||
|
frontend: node_modules
|
||||||
|
node ci/build.mjs
|
||||||
|
|
||||||
|
node_modules:
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
publish: frontend
|
||||||
bash ./ci/build.sh
|
bash ./ci/build.sh
|
||||||
|
|
File diff suppressed because one or more lines are too long
252
frontend/app.js
252
frontend/app.js
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue