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

Write out HEAD sha/date in the build.log for the sake of troubleshooting & diagnostics #229

Merged
merged 3 commits into from
Jan 31, 2020

Conversation

HamedSabri-adsk
Copy link
Contributor

No description provided.

Copy link
Contributor

@mattyjams mattyjams left a 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()
Copy link
Contributor

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. :)

Copy link
Contributor Author

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"

Copy link

@kxl-adsk kxl-adsk left a 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

@HamedSabri-adsk
Copy link
Contributor Author

@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.

@kxl-adsk kxl-adsk merged commit d2c1a46 into dev Jan 31, 2020
@kxl-adsk kxl-adsk deleted the sabrih/add_sha_info_build_log branch January 31, 2020 15:03
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

Successfully merging this pull request may close these issues.

3 participants