Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this makes it so the project can be installed simply via `go install` to conform with golang standards. The base checkmake.go is just a symlink to the actual main binary in `cmd/checkmake` so we don't need to maintain the same file in two locations. There is one downside with using go install right now, which is that all of the version information for `checkmake --version` will be missing as it gets filled in by make on build. We might find a way to fix this in the future but for now `make` or the prebuilt packages are the preferred way of installing checkmake. And `go install` is the less nice version to conform with standards and support easier usage from other tools. fixes #19
- Loading branch information
2d3fb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly a
go get github.com/mrtazz/checkmake
now fails withpackage github.com/mrtazz/checkmake: read C:\Users\lucas_cimon\gohome\src\github.com\mrtazz\checkmake\checkmake.go: unexpected NUL in input
This is probably due to: https://stackoverflow.com/a/27369325/636849
2d3fb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I only testedgo install
. I think renaming the symlink tomain.go
probably fixes it. Going to give it a try.I just tried the
go get
and it works fine for me:Is this something specifically about Windows or Linux?
2d3fb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I tested it under Ubuntu, and the
pre-commit
hook now works perfectly well !Many thanks
I'm going to investigate the issue with Cygwin
2d3fb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the symbolic link does not work under WIndows.
Here is what I get in a Windows shell (not in Cygwin):
Could you simply copy that file ?
I know it means code duplication, but I doubt any symlink-based solution is going to work under WIndows.