mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-28 11:40:04 +00:00
Version 3 starter
This commit is contained in:
56
backend/Taskfile.yml
Normal file
56
backend/Taskfile.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
version: '2'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- task: run
|
||||
|
||||
run:
|
||||
desc: Build and run
|
||||
sources:
|
||||
- internal/**/*.go
|
||||
- cmd/**/*.go
|
||||
cmds:
|
||||
- task: build
|
||||
- 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 -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go
|
||||
silent: true
|
||||
- task: lint
|
||||
vars:
|
||||
GIT_COMMIT:
|
||||
sh: git log -n 1 --format=%h
|
||||
VERSION:
|
||||
sh: cat ../.version
|
||||
env:
|
||||
GO111MODULE: on
|
||||
CGO_ENABLED: 1
|
||||
|
||||
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
|
Reference in New Issue
Block a user