atkrad / wait4x

Wait4X allows you to wait for a port or a service to enter the requested state.
https://wait4x.dev
Apache License 2.0
266 stars 18 forks source link

Adjust pipeline to output .exe for Windows instead of file without extension #105

Closed sbaeurle closed 1 year ago

sbaeurle commented 1 year ago

If one wants to use Wait4X on Windows or with Windows Containers the current output of the github pipeline cannot be used directly and must be renamed to wait4x.exe to become available in both Powershell and CMD. Is it possible to change the pipeline output to reflect this requirement already?

PS. If needed I can adjust the stuff myself, just wanted to start a discussion about it first.

atkrad commented 1 year ago

Hey @sbaeurle,

Thanks for reporting the issue. It would be great if you'd like to send a PR for that.

sbaeurle commented 1 year ago

Will do so. Just for my understanding, does the buildx bake command already produce .tar.gz archives or when does the archiving occur?

atkrad commented 1 year ago

No, it doesn't. At the "releaser" target in the Dockerfile, we execute the tar command to make an archive file. https://github.com/atkrad/wait4x/blob/main/Dockerfile#L33 But I consider the binary name in the Makefile: https://github.com/atkrad/wait4x/blob/main/Makefile#L88

What is your solution?

sbaeurle commented 1 year ago

Okay, got it so far :) I added a separate if check in the Dockerfile that simply renames the binary to .exe if the TARGETOS is windows.

sbaeurle commented 1 year ago

Thanks for the timely help and feedback in the PR :)