Skip to content

Commit

Permalink
Pass ldflags in to air.toml and go-run make target
Browse files Browse the repository at this point in the history
  • Loading branch information
Jont828 committed Aug 15, 2023
1 parent acf9c83 commit d50fb6c
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 d50fb6c

Please sign in to comment.