Untitled
unknown
plain_text
a year ago
2.1 kB
6
Indexable
diff --git "a/D:\\Gleb\\chromiumembedded-cef-f061c231e6a9\\chromiumembedded-cef-f061c231e6a9\\tools\\make_version_header.py" "b/C:\\Users\\clarityad\\Desktop\\Gleb\\patches\\cef\\tools\\make_version_header.py"
index d6d6bd2..9c6dbd6 100644
--- "a/D:\\Gleb\\chromiumembedded-cef-f061c231e6a9\\chromiumembedded-cef-f061c231e6a9\\tools\\make_version_header.py"
+++ "b/C:\\Users\\clarityad\\Desktop\\Gleb\\patches\\cef\\tools\\make_version_header.py"
@@ -58,7 +58,6 @@ if options.header is None or options.cef_version is None or options.chrome_versi
def write_version_header(header, chrome_version, cef_version, cpp_header_dir):
""" Creates the header file for the current revision and Chrome version information
if the information has changed or if the file doesn't already exist. """
-
if not path_exists(chrome_version):
raise Exception('Chrome version file ' + chrome_version +
' does not exist.')
@@ -76,11 +75,20 @@ def write_version_header(header, chrome_version, cef_version, cpp_header_dir):
year = get_year()
- if not git.is_checkout('.'):
- raise Exception('Not a valid checkout')
-
- commit_number = git.get_commit_number()
- commit_hash = git.get_hash()
+ commit_number = None
+ commit_hash = None
+ assumed_commit_number = os.environ.get('CEF_GIT_ASSUME_COMMIT_NUMBER')
+ assumed_hash = os.environ.get('CEF_GIT_ASSUME_HASH')
+ if assumed_commit_number is None:
+ assert assumed_hash is None, 'When environment variable CEF_GIT_ASSUME_COMMIT_NUMBER is not set then environment variable CEF_GIT_ASSUME_HASH must not be set'
+ if not git.is_checkout('.'):
+ raise Exception('Not a valid checkout')
+ commit_number = git.get_commit_number()
+ commit_hash = git.get_hash()
+ else:
+ assert assumed_hash is not None, 'When environment variable CEF_GIT_ASSUME_COMMIT_NUMBER is set then environment variable CEF_GIT_ASSUME_HASH must be set'
+ commit_number = assumed_commit_number
+ commit_hash = assumed_hash
version = '%s.%s.%s.g%s' % (args['CEF_MAJOR'], args['BUILD'], commit_number,
commit_hash[:7])
Editor is loading...
Leave a Comment