brimdata / zync

Kafka connector to sync Zed lakes to and from Kafka topics
BSD 3-Clause "New" or "Revised" License
17 stars 3 forks source link

Enable creation of release assets #124

Closed philrz closed 1 month ago

philrz commented 1 month ago

We recently had a request from a community user to have Windows binaries of zync available so they could run it without having to install Go and compile the code on their workstation. To provide this, here I've enabled the same approach we use in the Zed repo for creating tagged release assets, which in this case would allow the user to download and unpack the ZIP on their Windows system and copy the zync.exe to a folder that's in their PATH.

I've tested out the approach in this branch in a personal fork https://github.com/philrz/zync and you can see the successfully-created artifacts in https://github.com/philrz/zync/releases. As a smoke test I did unzip the Windows bundle and was able to successfully invoke the zync.exe. I also went ahead and made a fork of our Homebrew repo at https://github.com/philrz/homebrew-tap and you can see the zync formula populated ok there as well.

One thing I'll point out is that my artifact from the personal fork does not return a proper version string.

C:\Users\Phil\Downloads\zync-v1.0.0.windows-amd64>.\zync.exe version
(devel)

I suspect this problem may not show up when we create artifacts in the true zync repo, since we have a very similar known problem with Zed in personal forks (https://github.com/brimdata/zed/issues/4921). However, this whole topic of how the version strings get assembled has always been a little mysterious to me so I figured I'd point it out in case it concerns anyone enough that they want to dig deeper before merging this.

philrz commented 1 month ago

@nwt: I accepted your suggested changes, mirrored them into my personal fork at https://github.com/philrz/zync , made a test release v0.10.0, and successfully installed it via brew. So, I think this PR is ready for another look and possible Approve.

philrz commented 1 month ago

As a final test after that last commit from @nwt, I repeated the creation of a tagged release on my fork repo. The version string now appears as expected:

C:\Users\Phil\Downloads\zync-v0.10.0.windows-amd64>.\zync.exe version
v0.10.0

The same was also true on Linux and macOS (both the unpacked artifact from the GitHub Releases and the brew-installed binary).