update makefile and air config to run codegen

This commit is contained in:
Kevin Pham
2023-12-05 02:04:18 -06:00
parent bc715d9101
commit 692b2a5d17
2 changed files with 11 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ tmp_dir = "tmp"
bin = "./tmp/main" bin = "./tmp/main"
cmd = "go build -o ./tmp/main ./cmd" cmd = "go build -o ./tmp/main ./cmd"
delay = 1000 delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"] exclude_dir = ["assets", "tmp", "vendor", "testdata",]
exclude_file = [] exclude_file = ["proxychain/ruleset/rule_resmod_types.gen.go", "proxychain/ruleset/rule_reqmod_types.gen.go"]
exclude_regex = ["_test.go"] exclude_regex = ["_test.go"]
exclude_unchanged = false exclude_unchanged = false
follow_symlink = false follow_symlink = false
@@ -21,7 +21,7 @@ tmp_dir = "tmp"
poll = false poll = false
poll_interval = 0 poll_interval = 0
post_cmd = [] post_cmd = []
pre_cmd = ["git submodule update --init --recursive; git rev-parse --short HEAD > handlers/VERSION; git rev-parse --short HEAD > cmd/VERSION"] pre_cmd = ["git submodule update --init --recursive; git rev-parse --short HEAD > handlers/VERSION; git rev-parse --short HEAD > cmd/VERSION; cd proxychain/codegen && go run codegen.go"]
rerun = false rerun = false
rerun_delay = 500 rerun_delay = 500
send_interrupt = false send_interrupt = false

View File

@@ -1,3 +1,10 @@
build:
cd proxychain/codegen && go run codegen.go
git submodule update --init --recursive
git rev-parse --short HEAD > handlers/VERSION
git rev-parse --short HEAD > cmd/VERSION
go build -o ladder -ldflags="-s -w" cmd/main.go
lint: lint:
gofumpt -l -w . gofumpt -l -w .
golangci-lint run -c .golangci-lint.yaml --fix golangci-lint run -c .golangci-lint.yaml --fix