Skip to content

Commit

Permalink
SQUASH AGAINST: WIP: Add error handling for git describe command
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlettroscoe committed Jul 26, 2023
1 parent 8a43292 commit 481aded
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tribits/doc/utils/gen_doc_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ function generate_git_version_file {
echo
echo "Generating git version"
echo
git describe --match="$_TRIBITS_TAG_PREFIX*" > TribitsGitVersion.txt
gitExitCode=$?
if [[ "${gitExitCode}" != "0" ]] ; then
git describe --junk --match="$_TRIBITS_TAG_PREFIX*" > TribitsGitVersion.txt || \
echo "$_TRIBITS_TAG_PREFIX.{Unknown version}" > TribitsGitVersion.txt
fi
else
echo "$_TRIBITS_TAG_PREFIX.{Unknown version}" > TribitsGitVersion.txt
fi
Expand Down

0 comments on commit 481aded

Please sign in to comment.