Skip to content
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

Build CLI binary as executable prior to zip/release #2880

Closed
prrao87 opened this issue Feb 13, 2024 · 5 comments
Closed

Build CLI binary as executable prior to zip/release #2880

prrao87 opened this issue Feb 13, 2024 · 5 comments
Assignees
Labels
cli usability Issues related to better usability experience, including bad error messages

Comments

@prrao87
Copy link
Member

prrao87 commented Feb 13, 2024

The current CLI downloaded via the URL (for example, this one), when unzipped just provides a file. The user has to manually convert the file to an executable on Linux/MacOS by typing chmod +x kuzu to allow it to be executed.

Is there something that could be done during the build process that allows us to unzip the downloaded file directly as an executable?

@prrao87 prrao87 added usability Issues related to better usability experience, including bad error messages cli labels Feb 13, 2024
@benjaminwinger
Copy link
Collaborator

We're using the upload-artifact action, which according to its documentation does not preserve file permissions (not all zip tools handle permissions, as permissions were an extension of the format as far as I'm aware). There is an open issue.

I think all that should be necessary is to manually create the zip archive with a tool that supports permissions, and upload that.

@mewim
Copy link
Member

mewim commented Feb 14, 2024

Instead of creating zip file, let's just switch to tar.gz, which should preserve file permissions robustly. However, as per https://github.com/actions/upload-artifact?tab=readme-ov-file#zip-archives:

When an Artifact is uploaded, all the files are assembled into an immutable Zip archive. There is currently no way to download artifacts in a format other than a Zip or to download individual artifact contents.

There are also several related issues: actions/upload-artifact#109 and actions/upload-artifact#39.

So this means that the build pipeline will create a tar.gz, but it will be double-zipped by upload-artifact. The person responsible for releasing needs to unzip the artifact and upload the enclosed tar.gz file.

@prrao87
Copy link
Member Author

prrao87 commented Feb 14, 2024

Does this work on all OSes without any issues? If so, we should properly document it.

@mewim
Copy link
Member

mewim commented Feb 14, 2024

Does this work on all OSes without any issues? If so, we should properly document it.

tar.gz should be supported by macOS and most Linux distros by default. For Windows, we will keep publishing zip. I do not have a Windows machine to test right now, but I think Windows also does not require setting permission for exe files (@acquamarin and @benjaminwinger can comment)?

@benjaminwinger
Copy link
Collaborator

No, windows doesn't have executable permissions. .exe files are always executable.

@mewim mewim closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli usability Issues related to better usability experience, including bad error messages
Projects
None yet
Development

No branches or pull requests

4 participants