-
Notifications
You must be signed in to change notification settings - Fork 423
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
post-build version numbers #72
Comments
Ah, so the version is there before the build, but it's not easy to get at because you can't just |
No, the version isn't there before the build, it gets constructed from a 'git describe' call during the build, and can be retrieved from the package at that point. |
I see. We should probably allow a similar thing for the build string. How should we implement it? Maybe some flag that indicates to get the version from some environment variable, which is set in the build script. |
Having the build script set it in an environment variable would work well, sure. |
Thoughts how to do this @ilanschnell? |
If the build script sets an environment variable, how can we access it after the build script is finished? |
If that's not feasible, I guess a different approach is needed |
The build script write a special file, e.g. named |
Why not call it Do you always have write access to the source directory? Perhaps we can look for this in the build directory instead? |
The source directory is where things get build usually. There is always write access to the source directory, for example when you extract a tarball, you need to be able to write files like |
Actually, one needs the ability to extract the source tarball there in the first place. |
Good point, Aaron! |
What should be placed in the meta.yaml for the version in this case? Nothing? A special placeholder? |
I would argue that nothing extra is put into the meta.yaml file. There can even be a version in it, but as soon as the special file is found, it uses that. |
OK, that is simple enough. |
I disagree, I think a special tag should go in the meta.yaml, so that if a bug prevents the version file creation, an error is raised instead of silently producing a junk version. |
I just tested this new feature and can verify that it works as expected. |
I have also updated the docs. |
Just as a reference, |
Hi there, thank you for your contribution! This issue has been automatically locked because it has not had recent activity after being closed. Please open a new issue if needed. Thanks! |
For conda build to be useful in a CI setting, where builds are regularly created from a version control branch, the version number needs to be set after the build is finished. Maybe the version tag would be excluded from the build yaml, and a post_build_version tag or similar would be created, which is a script to execute on the built package to request its version number.
The text was updated successfully, but these errors were encountered: