492 Commits

Author SHA1 Message Date
xiantang 646949d447 fix https://github.com/cosmtrek/air/issues/480 (#484) 2023-10-20 00:44:57 +08:00
Walddys Emmanuel Dorrejo Céspedes 3c09ad7ea9 Add Podman/Docker container control like app with function in the shellrc (#469)
* Update README.md

Setup Function air for easy management of container.

* Update README.md

fix misspelled words.

---------

Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2023-10-19 22:54:50 +08:00
Bo-Yi Wu ee40f424f2 chore: update GitHub Actions versions in build and release workflows (#481)
- Update the version of `actions/checkout` from `v2` to `v4` in `.github/workflows/build.yml`
- Update the version of `actions/setup-go` from `v2` to `v4` in `.github/workflows/build.yml`
- Update the version of `codecov/codecov-action` from `v2` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/setup-qemu-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/setup-buildx-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/login-action` from `v1` to `v3` in `.github/workflows/build.yml`
- Update the version of `docker/build-push-action` from `v2` to `v5` in `.github/workflows/build.yml`
- Update the version of `docker/setup-qemu-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/setup-buildx-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/login-action` from `v1` to `v3` in `.github/workflows/release.yml`
- Update the version of `docker/build

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-19 22:22:36 +08:00
xiantang 8e809043d6 fix failed test case 2023-10-18 22:21:36 +08:00
xiantang 7c33df9e3d Revert "fix: close the e.canExit channel in the start function (#477)" (#479)
This reverts commit 8a22712671.
2023-10-18 22:16:14 +08:00
Bo-Yi Wu 8a22712671 fix: close the e.canExit channel in the start function (#477)
- Add a line to close the `e.canExit` channel in the `start` function

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-10-18 22:05:22 +08:00
xiantang 3d7b3d8fba build when merge request to master 2023-10-18 21:29:10 +08:00
Bo-Yi Wu bf9ec3c5a4 refactor: refactor test functions and remove unused variables (#476)
* refactor: refactor test functions and remove unused variables

- Remove the `runArgs` variable
- Change the way `flag.CommandLine.Parse` is called
- Modify the `TestBinCmdPath` function
- Modify the `TestConfigWithRuntimeArgs` function
- Modify the `TestCtrlCWhenHaveKillDelay` function
- Modify the `include_file` value in the `TestCtrlCWhenHaveKillDelay` function
- Modify the `include_file` value in the `TestConfigRuntimeArgs` function
- Modify the `TestFlag` function
- Modify the `TestConfigRuntimeArgs` function
- Modify the `Test_killCmd_SendInterrupt_false` function
- Modify the `bytesRead` variable in the `Test_killCmd_SendInterrupt_false` function

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix: testing

Signed-off-by: appleboy <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-10-18 20:52:15 +08:00
xiantang 149f99f02c add waitgoup for go function 2023-10-18 17:23:23 +08:00
xiantang a85e26c67a add waitgroup 2023-10-18 17:23:23 +08:00
Bo-Yi Wu 0c3f5ea7fa docs(readme): update style format. (#475) 2023-10-17 16:42:52 +08:00
xiantang 9d67077eb4 Handle error 2023-10-16 22:07:59 +08:00
xiantang 0606c2a9e0 update README.md 2023-10-16 17:38:28 +08:00
xiantang 674878bc0c update README.md 2023-10-16 17:34:32 +08:00
xiantang 7a28752aa2 fix deprecated maintainer 2023-10-16 17:30:16 +08:00
xiantang 6e1761f52d fix failed test case 2023-10-16 16:58:49 +08:00
xiantang c24268c83b fallback to buildinfo when airversion and goversion is empty (#474)
* use build info as version, now can show version when using go install

* fix failed test case
2023-10-16 16:52:33 +08:00
xiantang d771611015 add comment for https://github.com/cosmtrek/air/issues/474 2023-10-15 16:31:48 +08:00
xiantang 4603314db8 set build delay to zero to fix https://github.com/cosmtrek/air/issues/473 2023-10-15 16:24:07 +08:00
xiantang eda625e705 remove space 2023-10-15 14:39:56 +08:00
TOGASHI Tomoki b5ef265d54 fix: Prevent duplicate processes when multiple buildRuns run simultaneously (#457)
* stop other bin process when start bin

* make killFunc resume by binStopCh only

* Remove labeled break
2023-10-10 17:10:08 +08:00
xiantang 9644428b22 set kill delay as nanosecond in example 2023-10-10 00:30:18 +08:00
Kareem Ebrahim c29522a1f3 Pre & Post commands (#461)
* feat: pre_cmd before each build

* test: pre_cmd option & runPreCmd func

* refactor: cmd&pre_cmd run logic into runCommand

* test: runCommand func

* docs: update example toml

* refactor: use fs to ensure pre_cmd is working

* feat: run post_cmd after ^C

* test: post_cmd

* docs: update example toml

* style: use single quotes instead of escape char
2023-09-21 09:34:11 +08:00
xiantang af962ce3f6 Deal with sighup (#460)
* Modified engine_test.go file

* deal with SIGHUP signal in main.go file
2023-08-28 10:46:26 +08:00
xiantang 45cb622775 Modified engine_test.go file (#459) 2023-08-28 10:45:12 +08:00
mosa 4890388046 Add CGO_ENABLED=0 (#450) 2023-08-18 09:39:06 +08:00
Ethan Daniel ee37436c59 chore: bump Go to 1.21 (#449)
* update Go to 1.21

* undo format changes
2023-08-10 10:13:52 +08:00
Long Nguyễn Giao Huỳnh b7963c8461 chore: bump version of mergo (#440) 2023-07-06 08:02:27 +08:00
Rick Yu 32675c4c22 fix: revert code 2023-06-02 23:44:35 +08:00
Zach Gray a2fd83c0f1 dont filter out chmod events, as they're valid filewatcher events dispatched by popular tools specifically for livereload (#418) 2023-06-02 22:55:49 +08:00
Rick Yu 4315cda77b fix: make CGO_ENABLED=0 2023-06-02 22:50:14 +08:00
MakKi (makki_d) 1111f70960 build for unix (#402) 2023-06-02 22:39:28 +08:00
cui fliter 927aa353ec fix function name in comment (#422)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-02 22:36:40 +08:00
Kanata Miyahana 76e45cc76c fix go version in readme (#414) 2023-04-20 20:13:15 +08:00
Sander van Harmelen 6e01a68c91 Prevent double delays and add some docs (#411)
* Fix a few linter warnings

* Prevent double delays and add some docs

I just noticed that reusing `delay` for the poll interval will cause an unintended double delay (first the delay is used as interval, and when a change happened delay is used to wait before building after the change).

Adding a dedicated `poll_interval` parameter allows people to prevent that and apply a more fine-grained configuration.

Also added the new params to the example toml file with some docs which I forgot to do in the initial PR.
2023-04-13 22:01:31 +08:00
Sander van Harmelen f6746cf7fb Add support for polling for file changes (#409)
Fixes #360
2023-04-12 22:38:38 +08:00
Rick Yu 39c5f447cd fix: Update README.md 2023-03-14 09:09:11 +08:00
Rick Yu 5cd62ac06d chore: update gosum 2023-02-25 21:26:30 +08:00
Kevin Centeno 5b4facdb3b chore: bump go to 1.20 and update deps (#394) 2023-02-23 12:35:28 +08:00
Rick Yu 84c5f5569e docs: update README 2023-01-14 00:06:48 +08:00
Harry Merritt 26c752a7b0 Feat: option to silence verbose air logging using main_only in config (#367)
* feat: silence air logging using main_only in config

* docs: update air_example with main_only usage
2023-01-13 23:06:32 +08:00
Rick Yu fafccf2ca8 chore: bump go to 1.19 and update deps (#375) 2023-01-13 10:38:00 +08:00
amikai 81903fa04d test: restore the cwd for every test (#373)
* test: restore the cwd for every test
2023-01-12 16:06:56 +08:00
Rick Yu 7cf2215cdf chore: fix broken badge (#374) 2023-01-12 11:51:19 +08:00
amikai 078d8ffa29 feat: support executing bin again when bin exit (#363)
* feat: support executing bin again when bin exit

* fix bug and add feature flag

* add rerun test

* disable rerun in default

* fix logic error

* delete unnecessary code

* add default option in toml

Co-authored-by: xiantang <zhujingdi1998@gmail.com>
2023-01-05 15:36:20 +08:00
iftikharqureshi d0a697adcf Log output doesn't show until close #50 (#369) 2023-01-03 14:25:57 +08:00
amikai eab4c8a48a avoid reusing port by giving dlv random port (#364) 2022-12-10 23:19:23 +08:00
MohamadReza 9be7d45d64 Feat clear on rebuild (#348)
* create feature to completely clear terminal

* change Println to Print

* change KeepScroll default value to 'true'
2022-11-06 19:57:35 +08:00
吕程风 266b70c413 docs: update README-zh_cn.md (#346) 2022-10-31 01:21:54 +08:00
Thang Nguyen 990ad00787 Add the tutorial for docker users (#342)
* Add the tutorial for docker users

Add example of Dockerfile and docker-compose.yaml for Docker users who don't want to use air image which was fixed with a Golang version.

* Add code block hint code block

Add Dockerfile hint and yaml hint for code block in README.md
2022-10-26 14:13:50 +08:00