goshort/Makefile
Gustavo Maronato 28b49fb78f
All checks were successful
Check / checks (push) Successful in 2m57s
use odc instead of oidc for url
2024-03-23 14:56:02 -04:00

41 lines
759 B
Makefile

.PHONY: install frontend backend all dev
install-frontend:
npm ci --prefix frontend
install-backend:
go mod download
install: install-frontend install-backend
frontend:
VITE_API_URL=/api VITE_OIDC_URL=/odc npm run --prefix frontend build
VERSION=$(shell git describe --tags --abbrev=0)
backend:
CGO_ENABLED=0 go build -v -ldflags="-X 'main.version=${VERSION}'" -o goshort goshort.go
all: frontend backend
serve:
go run goshort.go serve
dev:
go run goshort.go dev
lint-frontend:
VITE_API_URL=/api VITE_OIDC_URL=/odc npm run --prefix frontend lint
lint-frontend-fix:
VITE_API_URL=/api VITE_OIDC_URL=/odc npm run --prefix frontend lint:fix
lint-backend:
golangci-lint run
lint-backend-fix:
golangci-lint run --fix
test:
go test -v ./...