forked from conda-forge/openvino-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * Added 001-win-cmake-version.patch
- Loading branch information
1 parent
ed3ff2d
commit 200a7c7
Showing
6 changed files
with
102 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff --git a/cmake/developer_package/version.cmake b/cmake/developer_package/version.cmake | ||
index 1b71befe44..1d71eaf93b 100644 | ||
--- a/cmake/developer_package/version.cmake | ||
+++ b/cmake/developer_package/version.cmake | ||
@@ -10,8 +10,11 @@ function(ov_branch_name VAR REPO_ROOT) | ||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD | ||
WORKING_DIRECTORY ${REPO_ROOT} | ||
OUTPUT_VARIABLE GIT_BRANCH | ||
+ RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
- set (${VAR} ${GIT_BRANCH} PARENT_SCOPE) | ||
+ if(EXIT_CODE EQUAL 0) | ||
+ set(${VAR} ${GIT_BRANCH} PARENT_SCOPE) | ||
+ endif() | ||
endif() | ||
endfunction() | ||
|
||
@@ -21,22 +24,31 @@ function(ov_commit_hash VAR REPO_ROOT) | ||
COMMAND ${GIT_EXECUTABLE} rev-parse --short=11 HEAD | ||
WORKING_DIRECTORY ${REPO_ROOT} | ||
OUTPUT_VARIABLE GIT_COMMIT_HASH | ||
+ RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
- set (${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE) | ||
+ if(EXIT_CODE EQUAL 0) | ||
+ set(${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE) | ||
+ endif() | ||
endif() | ||
endfunction() | ||
|
||
function(ov_commit_number VAR REPO_ROOT) | ||
+ set(GIT_COMMIT_NUMBER_FOUND OFF) | ||
if(GIT_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-list --count --first-parent HEAD | ||
WORKING_DIRECTORY ${REPO_ROOT} | ||
OUTPUT_VARIABLE GIT_COMMIT_NUMBER | ||
+ RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
- set (${VAR} ${GIT_COMMIT_NUMBER} PARENT_SCOPE) | ||
- else() | ||
+ if(EXIT_CODE EQUAL 0) | ||
+ set(GIT_COMMIT_NUMBER_FOUND ON) | ||
+ set(${VAR} ${GIT_COMMIT_NUMBER} PARENT_SCOPE) | ||
+ endif() | ||
+ endif() | ||
+ if(NOT GIT_COMMIT_NUMBER_FOUND) | ||
# set zeros since git is not available | ||
- set (${VAR} "000" PARENT_SCOPE) | ||
+ set(${VAR} "000" PARENT_SCOPE) | ||
endif() | ||
endfunction() | ||
|
||
@@ -140,7 +152,7 @@ macro(ov_parse_ci_build_number repo_root) | ||
ov_branch_name(GIT_BRANCH "${repo_root}") | ||
ov_commit_hash(GIT_COMMIT_HASH "${repo_root}") | ||
|
||
- if(NOT GIT_BRANCH STREQUAL "master") | ||
+ if(NOT GIT_BRANCH MATCHES "^(master|HEAD)$") | ||
set(GIT_BRANCH_POSTFIX "-${GIT_BRANCH}") | ||
endif() | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.