-
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
Don't define GIT_ environment variables if the work directory is out-of-sync #758
Conversation
Sorry, this looks like some Python 3 string issues at https://github.com/conda/conda-build/pull/758/files#diff-8cf4f5bfdd4544775a2f28ef5e24b2c5R59 . Otherwise OK, thanks for fixing. |
9469820
to
89a00e6
Compare
… the current source directory has the correct git repo in it.
89a00e6
to
7ce7be2
Compare
Whoops, thanks. Fixed now. |
d.update(**get_git_build_info(d['SRC_DIR'])) | ||
d.update(**get_git_build_info(d['SRC_DIR'], | ||
m.get_value('source/git_url'), | ||
m.get_value('source/git_rev', default='master'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check for git_tag here, also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my first try, but it turns out git_rev
is a synonym for git_tag
, and it's the canonical spelling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out. I just want to make sure: this fix works for people who specify git_tag in their recipe, rather than git_rev?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. git_tag
and git_branch
are copied into git_rev
(and then deleted -- git_tag
is empty at this point).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. Merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I saw the introduction of git_rev
in the docs and was wondering what was going on. Will git_tag
and git_branch
then be deprecated and then removed at some point.
Don't define GIT_ environment variables if the work directory is out-of-sync
Before the package source is downloaded, variables like
GIT_DESCRIBE_TAG
can be given incorrect values if a previous build left a git repo in the source directory. It's not a huge problem, but it does produce incorrect status messages until the source is finally downloaded.This PR fixes it by leaving those
GIT_
variables undefined if thework
directory doesn't correspond to the package being built.