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

Fix up build.sh error handling #1075

Merged
merged 1 commit into from
Jul 26, 2018
Merged

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jul 25, 2018

  • avoid silent errors with git detection. command -v git had no 'else' thus exit code bubbled up.
  • actually check for $par_build. [ $par_build ] checks for string length >0 and not for value, which is satisfied by setting it to zero earlier and thus always true.
  • git-describe will break on shallow clone. Namely travis does this, fatal: No names found, cannot describe anything. will happen if there are >50 commits since last fetched one (or where i got this is cloning repo with --depth=1 and trying to use build script). can tweak depth, but since it is just used as a nice banner switch to version+revision, as version is already known from the header and not really related to tag value.

* Change git detection to not accidentaly exit the shell
* Fix [ $par_build ] always being true
* Fix git-describe with shallow clone ("No tags can describe ...")
@xoseperez xoseperez merged commit 167c3ab into xoseperez:dev Jul 26, 2018
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.

2 participants