[x265] [x265 Patch] [All branches] perform version data integrity checks for git archive repositories.

Srikanth Kurapati srikanth.kurapati at multicorewareinc.com
Thu Nov 5 15:53:56 CET 2020


>From f262afa2155404f6f4eb28c4f0dd1aa086c1feb4 Mon Sep 17 00:00:00 2001
From: Srikanth Kurapati <srikanth.kurapati at multicorewareinc.com>
Date: Thu, 5 Nov 2020 19:10:55 +0530
Subject: [PATCH] perform version data integrity checks for git archive
 repositories.

---
 source/cmake/Version.cmake | 50 +++++++++++++++++++++-----------------
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/source/cmake/Version.cmake b/source/cmake/Version.cmake
index 37c759268..71c3489de 100644
--- a/source/cmake/Version.cmake
+++ b/source/cmake/Version.cmake
@@ -166,28 +166,34 @@ elseif(GIT_ARCHETYPE STREQUAL "1")
     endif()
 endif()

-# formatting based on positive or negative distance from tag
-if(X265_TAG_DISTANCE STREQUAL "0")
-    if(X265_REVISION_ID STREQUAL X265_REPO_ID)
-        set(X265_VERSION "${X265_LATEST_TAG}")
-    else()
-        message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING")
-    endif()
-elseif(X265_TAG_DISTANCE STRGREATER "0")
-    if(X265_REVISION_ID STRLESS X265_REPO_ID)
-        set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}")
-    else()
-        message(WARNING "ARCCHIVE TIP CHANGESET TO BE GREATER THAN
REVISION ID")
-    endif()
-elseif(X265_TAG_DISTANCE STRLESS "0")
-    if(X265_REVISION_ID STRGREATER X265_REPO_ID)
-       set(X265_VERSION
"${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}")
-    else()
-        message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE
TIP CHANGESET")
-    endif()
+#Formatting based on positive or negative distance from tag for git archive
+if(GIT_ARCHETYPE EQUAL "1")
+ if(X265_TAG_DISTANCE STREQUAL "0")
+ if(X265_REVISION_ID STREQUAL X265_REPO_ID)
+ set(X265_VERSION "${X265_LATEST_TAG}")
+ else()
+ message(WARNING "REPO AND RELEASE CHANGESETS NOT MATCHING")
+ endif()
+ elseif(X265_TAG_DISTANCE STRGREATER "0")
+ if(X265_REVISION_ID STRLESS X265_REPO_ID)
+ set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}")
+ else()
+ message(WARNING "ARCHIVE TIP CHANGESET TO BE GREATER THAN REVISION ID")
+ endif()
+ elseif(X265_TAG_DISTANCE STRLESS "0")
+ if(X265_REVISION_ID STRGREATER X265_REPO_ID)
+    set(X265_VERSION
"${X265_LATEST_TAG}${X265_TAG_DISTANCE}+${X265_REPO_ID}")
+ else()
+ message(WARNING "REVISION ID EXPECTED TO BE LARGER THAN ARCHIVE TIP
CHANGESET")
+ endif()
+ else()
+ message(ERROR "Inappropriate set of version information")
+ endif()
 else()
-    message(ERROR "Inappropriate set of version information")
+ if(X265_TAG_DISTANCE STREQUAL "0")
+ set(X265_VERSION "${X265_LATEST_TAG}")
+ else()
+ set(X265_VERSION
"${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}")
+ endif()
 endif()
-
-#will always be printed in its entirety based on version file
configuration to avail revision monitoring by repo owners
 message(STATUS "x265 RELEASE VERSION ${X265_VERSION}")
-- 
2.20.1.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201105/d9220196/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-perform-version-data-integrity-checks-for-git-archiv.patch
Type: application/octet-stream
Size: 2900 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20201105/d9220196/attachment.obj>


More information about the x265-devel mailing list