mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
version: '3'
|
|
|
|
tasks:
|
|
go:mod:tidy:
|
|
summary: Runs `go mod tidy`
|
|
internal: true
|
|
cmds:
|
|
- go mod tidy
|
|
|
|
install:frontend:deps:
|
|
summary: Install frontend dependencies
|
|
dir: frontend
|
|
sources:
|
|
- package.json
|
|
- package-lock.json
|
|
generates:
|
|
- node_modules
|
|
preconditions:
|
|
- sh: npm version
|
|
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
|
|
cmds:
|
|
- npm install
|
|
|
|
build:frontend:
|
|
label: build:frontend (DEV={{.DEV}})
|
|
summary: Build the frontend project
|
|
dir: frontend
|
|
sources:
|
|
- "**/*"
|
|
- exclude: node_modules/**/*
|
|
generates:
|
|
- dist/**/*
|
|
deps:
|
|
- task: install:frontend:deps
|
|
cmds:
|
|
- npm run {{.BUILD_COMMAND}} -q
|
|
env:
|
|
PRODUCTION: '{{if eq .DEV "true"}}false{{else}}true{{end}}'
|
|
vars:
|
|
BUILD_COMMAND: '{{if eq .DEV "true"}}build:dev{{else}}build{{end}}'
|
|
|
|
generate:icons:
|
|
summary: Generates Windows `.ico` and Mac `.icns` from an image
|
|
dir: build
|
|
sources:
|
|
- "appicon.png"
|
|
generates:
|
|
- "icons.icns"
|
|
- "icon.ico"
|
|
cmds:
|
|
- echo "Icon generation skipped (no appicon.png)"
|
|
status:
|
|
- test ! -f appicon.png
|
|
|
|
dev:frontend:
|
|
summary: Runs the frontend in development mode
|
|
dir: frontend
|
|
deps:
|
|
- task: install:frontend:deps
|
|
cmds:
|
|
- npm run dev -- --port {{.VITE_PORT}} --strictPort
|