Files
comicverse/makefile

36 lines
769 B
Makefile
Raw Normal View History

PORT?=8080
2025-03-05 10:05:21 -03:00
lint:
golangci-lint run .
2025-03-05 10:05:21 -03:00
fmt:
go fmt .
golangci-lint run --fix .
dev:
go run github.com/joho/godotenv/cmd/godotenv@v1.5.1 \
2025-03-05 10:05:21 -03:00
go run github.com/air-verse/air@v1.52.2 \
--build.cmd "go build -o .tmp/bin/main ." \
--build.bin ".tmp/bin/main" \
--build.exclude_dir "node_modules" \
2025-03-05 11:00:28 -03:00
--build.include_ext "go,html" \
2025-03-05 10:05:21 -03:00
--build.stop_on_error "false" \
2025-03-05 11:00:28 -03:00
--proxy.enabled true \
--proxy.proxy_port $(PORT) \
--proxy.app_port $$(($(PORT) + 1)) \
2025-03-05 10:05:21 -03:00
--misc.clean_on_exit true \
2025-03-05 11:00:28 -03:00
-- -dev -port $$(($(PORT) + 1))
2025-03-05 10:05:21 -03:00
build:
go build -o ./.dist/app .
2024-10-11 22:19:07 -03:00
run: build
./.dist/app
2024-10-11 22:19:07 -03:00
clean:
# Remove generated directories
if [[ -d ".dist" ]]; then rm -r ./.dist; fi
if [[ -d "tmp" ]]; then rm -r ./tmp; fi
if [[ -d "bin" ]]; then rm -r ./bin; fi