1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-08 17:30:10 +00:00

Build javascript directly in container

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-06-27 21:49:30 +02:00
parent 7ecce5493b
commit 0ccfdd30af
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
3 changed files with 21 additions and 14 deletions

View file

@ -1,14 +1,24 @@
---
image: "reporunner/golang-alpine"
image: "reporunner/archlinux"
checkout_dir: /go/src/github.com/Luzifer/password
commands:
- make publish
- pacman -Sy --noconfirm
go
nodejs-lts-gallium
npm
zip
- make compile_js
- make
-C cmd/password
-f ../../Makefile
publish
environment:
CGO_ENABLED: 0
DRAFT: 'false'
GHUSER: Luzifer
PACKAGES: github.com/Luzifer/password/cmd/password
GOPATH: /go
PACKAGES: .
REPO: password

View file

@ -1,14 +1,11 @@
default:
compile_js:
rm -f ./frontend/assets/*
docker run --rm -i \
-v "$(CURDIR):$(CURDIR)" \
-w "$(CURDIR)/js" \
-u $(shell id -u) \
node:18-alpine \
sh -c "node build.mjs"
compile_js: js/node_modules
cd js && node build.mjs
publish: compile_js
js/node_modules:
cd js && npm ci
publish:
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
bash golang.sh

View file

@ -1,4 +1,4 @@
module github.com/Luzifer/password/cmd/password
module github.com/Luzifer/password/v2/cmd/password
go 1.18
@ -8,12 +8,12 @@ require (
github.com/Luzifer/go_helpers/v2 v2.13.0
github.com/Luzifer/password/v2 v2.2.0
github.com/gorilla/mux v1.8.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.5.0
)
require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tredoe/osutil v1.0.6 // indirect