Skip to content

Commit

Permalink
chore: Add more tools to Makefile (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonjek authored Oct 9, 2024
1 parent 4cb03be commit 1e96c38
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,31 @@ run-docker:

## test: Run unit tests
.PHONY: test
test:
test: check-go
@go test ./...

# -------------------------------------------------------------------------------------------------
# tools && shared
# -------------------------------------------------------------------------------------------------

## tidy: Removes unused dependencies and adds missing ones
.PHONY: tidy
tidy: check-go
go mod tidy

## get-deps: Download go dependencies
.PHONY: get-deps
get-deps:
get-deps: check-go
go mod download

## tools: Install github.com/a-h/templ/cmd/templ@latest
.PHONY: tools
tools:
tools: check-go
go install github.com/a-h/templ/cmd/templ@latest

## get-air: Install live reload server github.com/cosmtrek/air@latest
.PHONY: get-air
get-air:
get-air: check-go
go install github.com/cosmtrek/air@latest

## generate: Compile templ files
Expand All @@ -63,6 +68,11 @@ generate:
air: get-deps generate
air

## check-go: Check that Go is installed
.PHONY: check-go
check-go:
@command -v go &> /dev/null || (echo "Please install GoLang" && false)

## help: Display help
.PHONY: help
help: Makefile
Expand Down

0 comments on commit 1e96c38

Please sign in to comment.