-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make postinstall portable #391
Conversation
There's no need for copying the executables manually (which happens in both makefile targets `bin` and `run_file`). Shards' `executables` takes care of that. The makefile targets could potentially be dropped as well, I don't think there would be other uses case for those.
Using `shards build` directly instead of `make build` improves portability a lot. This should basically "just work" almost anywhere (including Windows). No need for `make` to be available and makefile compatibility doesn't matter either.
Actually, installing But this is a bug in shards: It always appends |
I think we can merge as is. It requires a patched shards on Windows, but postinstall and executables don't currently work there anyway. So this is not making anything worse. And it will start working in the next shards release with crystal-lang/shards#593 merged. |
@straight-shoota Wow, thanks for this suggestion. Can we remove |
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.
Tested locally, LGTM.
@Sija please be free to finish the review or merge
There's no need for copying the executables manually (which happens in both makefile targets
bin
andrun_file
).Shards'
executables
takes care of that.The makefile targets could potentially be dropped as well, I don't think there would be other uses case for those.
Using
shards build
directly instead ofmake build
improves portability a lot.The result should be identical to the previous behaviour, except that it works on more platforms (including Windows).
Only practical difference is that the executables are linked instead of copied. This could perhaps be a problem for the source file
ameba.cr
. It should be fine for the binary.This should basically "just work" almost anywhere because
shards
is always available in the environment. No need formake
to be available and makefile compatibility doesn't matter either.Resolves #368