Skip to content

Commit

Permalink
Merge pull request #37 from Jont828/air-build
Browse files Browse the repository at this point in the history
Pass ldflags in to air.toml and go-run make target
  • Loading branch information
Jont828 authored Aug 15, 2023
2 parents acf9c83 + d50fb6c commit ed875a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tmp_dir = "tmp"

[build]
bin = "./tmp/main"
cmd = "go build -o ./tmp/main ."
cmd = "make build-go GO_BIN_OUT=./tmp/main"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "web/node_modules"]
exclude_file = []
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ run: $(GO_BIN_OUT) $(DIST_FOLDER)

.PHONY: go-run
go-run: $(DIST_FOLDER)
go run main.go
go run -ldflags "$(LDFLAGS)" main.go

.PHONY: air
air: .air.toml
Expand Down

0 comments on commit ed875a0

Please sign in to comment.