Skip to content

Config to restart without rebuilding the binary on certain file changes #778

@joshhunt

Description

@joshhunt

I'm using air for watch + rebuild of an application that reads from a config file on startup. It would be useful if I could configure air to just restart the binary when certain file patterns change.

I'm not sure what the best way to configure this is - my first thought was something similar to docker compose watch where you configure different actions for different paths:

[build]
cmd = "go build -o ./dist/main ."
bin = "dist/main"

[watch]
include_file = "config.ini"
action = "reload"

But this might be overkill for air (considering the only additional action would be reload).

Let me know what you think, and whether you would be open to a PR to contribute this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions