Skip to content

Commit 4820837

Browse files
chore(cli): switch from refresh to air for hot-reload in dev mode
1 parent 3250275 commit 4820837

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

cli/.air.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = "../"
2+
3+
[build]
4+
cmd = "go build -o cli ."
5+
bin = "/bin/true"
6+
delay = 1000
7+
exclude_regex = ["_test.go"]
8+
exclude_unchanged = false
9+
follow_symlink = false
10+
include_dir = ["pkg", "cli"]
11+
include_ext = ["go"]
12+
kill_delay = "0s"
13+
stop_on_error = true
14+
15+
[misc]
16+
clean_on_exit = true

cli/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ RUN go build
3333
FROM builder AS development
3434

3535
RUN apk add --update openssl build-base docker-cli
36-
RUN go install github.com/golangci/golangci-lint/cmd/[email protected]
36+
RUN go install github.com/cosmtrek/[email protected] && \
37+
go install github.com/golangci/golangci-lint/cmd/[email protected]
3738

3839
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub
3940

cli/entrypoint-dev.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#!/bin/sh
22

3-
go build
4-
5-
exec "$@"
3+
exec air

cli/refresh.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)