-
Notifications
You must be signed in to change notification settings - Fork 202
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
Write out HEAD sha/date in the build.log for the sake of troubleshooting & diagnostics #229
Conversation
…ng & diagnostics.
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.
Looks good to me! I had one minor cosmetic suggestion, but feel free to ignore.
build.py
Outdated
try: | ||
with CurrentWorkingDirectory(context.mayaUsdSrcDir): | ||
commitSha = subprocess.check_output('git rev-parse HEAD').decode() | ||
commitDate = subprocess.check_output('git log -1 --pretty=format:"%ad"'.split()).decode() |
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.
We just grabbed the commit in the previous command, so maybe slightly cleaner to get the date this way?:
git show <commitSha> --pretty=format:"%ad"
Either works though. :)
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 @mattyjams good suggestion. Just one minor thing, git show <commitSha>
shows diff information which we don't want. passing -s
did the trick.
Also instead of passing commitSHA, I simply passed HEAD. Either of these cosmetic works.
git show -s HEAD --format="%ad"
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.
@HamedSabri-adsk Can you test it on MacOS - I'm getting ERROR: Failed to run git commands : [Errno 2] No such file or directory
Hey @kxl-adsk , should be fixed now. |
No description provided.