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

buildInfo: Ensure we have a COMMIT_ID #4

Closed
wants to merge 1 commit into from

Conversation

wak-google
Copy link
Member

It's currently possible to build the current sbe without having git
installed and have the compiler complain about:

sbecmdgeneric.C:54:18: error: unable to find numeric literal operator
‘operator""x’
fwCommitId = SBE_COMMIT_ID;

This commmit makes it possible to specify a git COMMIT_ID, but fall back
to the old behavior of parsing the actual git data. It also makes sure
the process fails at this script instead of during compilation.

@wak-google
Copy link
Member Author

In case this wasn't clear from the above. In some situations, like using buildroot to pull down an archive of the repo, you only get the file contents without the .git directory. We need a way to still build the SBE even without the git information. Since most tools pulling down the archive tarball needed to specify the commit id to get the tarball, it makes sense that they could pass the commit id in manually to the build process. This still falls back to parsing the git information if no commit id is specified.

@sgupta2m
Copy link
Contributor

Can you please chnage

if 'COMMIT_ID' in os.environ:

  •    commitStr = os.environ['COMMIT_ID'][:8]
    

to SBE_COMMIT_ID. This is too generic flag as of now.

It's currently possible to build the current sbe without having git
installed and have the compiler complain about:

sbecmdgeneric.C:54:18: error: unable to find numeric literal operator
‘operator""x’
     fwCommitId = SBE_COMMIT_ID;

This commmit makes it possible to specify a git SBE_COMMIT_ID, but fall back
to the old behavior of parsing the actual git data. It also makes sure
the process fails at this script instead of during compilation.

Signed-off-by: William A. Kennington III <wak@google.com>
@wkennington
Copy link

Fixed

@sgupta2m sgupta2m closed this in 695eed7 Apr 20, 2017
@wak-google
Copy link
Member Author

Just a heads up it looks like you merged the commit using COMMIT_ID instead of SBE_COMMIT_ID

@sgupta2m
Copy link
Contributor

yeah. Thanks. bug in script which I have used for picking up the changes.

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.

None yet

3 participants