Skip to content

Commit

Permalink
Merge pull request #317 from JeffersonLab/nbrei_fix_git_error_messages
Browse files Browse the repository at this point in the history
Suppress spurious error messages during JVersion.h creation
  • Loading branch information
nathanwbrei authored Jul 16, 2024
2 parents e6d4fcd + 88e586a commit ed591e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/MakeJVersionH.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ set_property(
)

execute_process(
COMMAND git log -1 --format=%H
COMMAND git log -1 --format=%H 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE JVERSION_GIT_RESULT
OUTPUT_VARIABLE JVERSION_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git log -1 --format=%aD
COMMAND git log -1 --format=%aD 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git show-ref -s v${jana2_VERSION_MAJOR}.${jana2_VERSION_MINOR}.${jana2_VERSION_PATCH}
COMMAND git show-ref -s v${jana2_VERSION_MAJOR}.${jana2_VERSION_MINOR}.${jana2_VERSION_PATCH} 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_RELEASE_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git status --porcelain
COMMAND git status --porcelain 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_MODIFIED_FILES
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down

0 comments on commit ed591e1

Please sign in to comment.