Skip to content

Commit

Permalink
Merge branch 'cosmtrek:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aroberts89 authored Aug 18, 2023
2 parents c7f6547 + 4890388 commit 8852781
Show file tree
Hide file tree
Showing 18 changed files with 555 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v2
- name: setup Go 1.20
- name: setup Go 1.21
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21
- name: build
run: make build
- name: install dependency
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: setup Go
uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21
- name: set GOVERSION
run: echo "GOVERSION=$(go version | sed -r 's/go version go(.*)\ .*/\1/')" >> $GITHUB_ENV
- name: set AirVersion
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke_test_reuse_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v2
- name: setup Go 1.20
- name: setup Go 1.21
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21
- name: install
run: make install
- name: check rebuild
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke_test_window_reust_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v2
- name: setup Go 1.20
- name: setup Go 1.21
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.20
go-version: ^1.21
- name: Setup Python
uses: actions/setup-python@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ builds:
ldflags:
- -s -w -X "main.airVersion={{.Version}}"
- -s -w -X "main.goVersion={{.Env.GOVERSION}}"
env:
- CGO_ENABLED=0
archives:
- id: tar.gz
format: tar.gz
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 AS builder
FROM golang:1.21 AS builder

MAINTAINER Rick Yu <[email protected]>

Expand All @@ -12,7 +12,7 @@ RUN --mount=type=cache,target=/go/pkg/mod go mod download

RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make ci && make install

FROM golang:1.20
FROM golang:1.21

COPY --from=builder /go/bin/air /go/bin/air

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LDFLAGS += -X "main.BuildTimestamp=$(shell date -u "+%Y-%m-%d %H:%M:%S")"
LDFLAGS += -X "main.airVersion=$(AIRVER)"
LDFLAGS += -X "main.goVersion=$(shell go version | sed -r 's/go version go(.*)\ .*/\1/')"

GO := GO111MODULE=on go
GO := GO111MODULE=on CGO_ENABLED=0 go

.PHONY: init
init:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ air -v

### Via `go install`

With go 1.16 or higher:
With go 1.18 or higher:

```bash
go install github.com/cosmtrek/air@latest
Expand Down Expand Up @@ -168,7 +168,7 @@ services:
`Dockerfile`
```Dockerfile
# Choose whatever you want, version >= 1.16
FROM golang:1.20-alpine
FROM golang:1.21-alpine

WORKDIR /app

Expand Down Expand Up @@ -259,4 +259,4 @@ Give huge thanks to lots of supporters. I've always been remembering your kindne

## License

[GNU General Public License v3.0](LICENSE)
[GNU General Public License v3.0](LICENSE)
8 changes: 8 additions & 0 deletions air_example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ exclude_unchanged = true
follow_symlink = true
# This log file places in your tmp_dir.
log = "air.log"
# Poll files for changes instead of using fsnotify.
poll = false
# Poll interval (defaults to the minimum interval of 500ms).
poll_interval = 500 # ms
# It's not necessary to trigger build each time file changes if it's too frequent.
delay = 0 # ms
# Stop running old binary when build errors occur.
Expand Down Expand Up @@ -61,3 +65,7 @@ runner = "green"
[misc]
# Delete tmp directory on exit
clean_on_exit = true

[screen]
clear_on_rebuild = true
keep_scroll = true
13 changes: 11 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
module github.com/cosmtrek/air

go 1.20
go 1.21

require (
dario.cat/mergo v1.0.0
github.com/creack/pty v1.1.18
github.com/fatih/color v1.14.1
github.com/fsnotify/fsnotify v1.6.0
github.com/imdario/mergo v0.3.13
github.com/gohugoio/hugo v0.111.3
github.com/pelletier/go-toml v1.9.5
github.com/stretchr/testify v1.8.1
)

require (
github.com/bep/godartsass v0.16.0 // indirect
github.com/bep/golibsass v1.1.0 // indirect
github.com/cli/safeexec v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/tdewolff/parse/v2 v2.6.5 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 8852781

Please sign in to comment.