nginx-proxy-manager/backend/Taskfile.yml

71 lines
2.0 KiB
YAML
Raw Normal View History

2023-07-25 01:59:02 +00:00
version: "3"
tasks:
default:
cmds:
- task: run
run:
desc: Build and run
sources:
- internal/**/*.go
- cmd/**/*.go
- ../frontend/src/locale/src/*.json
cmds:
- task: locale
- task: build
force: true
- cmd: echo -e "==> Running..."
silent: true
- cmd: ../dist/bin/server
ignore_error: true
silent: true
env:
LOG_LEVEL: debug
build:
desc: Build the server
cmds:
- cmd: echo -e "==> Building..."
silent: true
- cmd: rm -f dist/bin/*
silent: true
- cmd: go build -tags 'json1' -buildvcs=false -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go
silent: true
- cmd: go build -buildvcs=false -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/ipranges ./cmd/ipranges/main.go
silent: true
- cmd: rm -f /etc/nginx/conf.d/include/ipranges.conf && /app/dist/bin/ipranges > /etc/nginx/conf.d/include/ipranges.conf
- task: lint
vars:
GIT_COMMIT:
sh: git log -n 1 --format=%h
VERSION:
sh: cat ../.version
lint:
desc: Linting
cmds:
- cmd: echo -e "==> Linting..."
silent: true
- cmd: bash scripts/lint.sh
silent: true
test:
desc: Testing
cmds:
- cmd: echo -e "==> Testing..."
silent: true
- cmd: bash scripts/test.sh
silent: true
locale:
desc: Locale
dir: /app/frontend
cmds:
- cmd: yarn locale-compile
silent: true
ignore_error: true
- cmd: chown -R "$PUID:$PGID" src/locale/lang
silent: true
ignore_error: true