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 with dev informations without Git dependency #3899

Open
vitoyucepi opened this issue May 2, 2024 · 2 comments
Open

Build with dev informations without Git dependency #3899

vitoyucepi opened this issue May 2, 2024 · 2 comments

Comments

@vitoyucepi
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I would like to be able to build without having a direct dependency on git.

Describe the solution you'd like

  1. If git exists, and the git repository was found, and the exit code of the git command is 0, then use the result of the git command.
  2. Otherwise, if an environment variable such as VERSION_HASH, COMMIT_ID or GIT_COMMIT is set, then use it.
  3. Otherwise, use an empty string or literally unknown. (none) is also fine, I guess.

Describe alternatives you've considered
Maybe it would be great to integrate with IS_SNAPSHOT somehow.

Additional context
If the project is built from github source archives like https://github.com/savonet/liquidsoap/archive/$_commit.tar.gz, then the git repository will not be available, but the commit could easily be set using the environment variable.

In addition, it would be great to explain all build time environment variables in the build manual.

@toots toots changed the title Build Dune project without Git dependency Build with dev informations without Git dependency May 2, 2024
@toots
Copy link
Member

toots commented May 2, 2024

Thanks I see what you mean. Do you have a specific situation where you would like to build from a downloaded archive instead of a git pull and yet retain the github SHA in the build?

@vitoyucepi
Copy link
Collaborator Author

The alpine APKBUILD I use has no support for sourcing git repositories, unlike archlinux PKGBUILD which has support for something like git+https://github.com/savonet/liquidsoap.git#commit=$_commit.
So I have to rely on the archive tarball to build from the rolling release and main branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants