Closed jexroid closed 3 months ago
@jexroid Nice PR! This solves the issue of manually configuring Air to get it working in Windows. Is there a way we can get the make watch command to work in Win? Check if Air is installed and offer an installation option. Is there a PowerShell syntax that will do the same as in Unix-based systems?
If not, we can use templating and just map make watch to air with a comment that Air can be installed with go install github.com/air-verse/air@latest
thanks @Ujstor I think im able to write a PowerShell for that which checks if air command return system error or not found. and return error statement that tell the user to install it your self or do the instructions for installing it using GO get
these failing tests are because of this:
{{if and (ne .DBDriver "none") (ne .DBDriver "sqlite")}}
# Integrations Tests for the application
itest:
@echo "Running integration tests..."
@go test ./internal/database -v
{{end}}
and the CI is testing for itest which will never exist in a project with no database or with sqlite is there anything else needed @Ujstor
I am a little bit busy...I will try to check the PR this weekend
alright, as we discussed the purpose of this PR is to generate a binary version of the go project based on the user OS which is configured in Makefile and run the file in .air.toml which solve the hot reloading in windows machines but there will be no Air auto installation on windows but its behave like before for Unix base machines.
seems like the Makefile:56: *** missing separator. Stop.
occurs when you use spaces instead of tabs. I realized and fixed that while using Windows but couldn't test it on UNIX machines. the problems have been addressed and fixed.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem/Feature
air live reload will be working on both Unixbased and Windows machines
Description of Changes:
UnixBased
with bool type is added toProject
typeUnixBased
to false by defaultChecklist