mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-27 09:41:17 +01:00
Fix script detection of git checkouts
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1330 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
e24a6b02af
commit
4abdd35309
@ -27,6 +27,10 @@ parser.add_option('-q', '--quiet',
|
||||
# The CEF root directory is the parent directory of _this_ script.
|
||||
cef_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||
|
||||
if not os.path.exists(os.path.join(cef_dir, '.svn')):
|
||||
sys.stdout.write("Not an SVN checkout.\n")
|
||||
sys.exit(0)
|
||||
|
||||
# Retrieve the CEF SVN info.
|
||||
cef_info = get_svn_info(cef_dir)
|
||||
if not options.quiet:
|
||||
|
@ -60,10 +60,12 @@ def write_svn_header(header, chrome_version, cef_version, cpp_header_dir):
|
||||
|
||||
year = get_year()
|
||||
|
||||
try:
|
||||
revision = svn.get_revision()
|
||||
except:
|
||||
revision = git.get_svn_revision()
|
||||
if os.path.exists(os.path.join('.', '.svn')):
|
||||
revision = svn.get_revision()
|
||||
elif os.path.exists(os.path.join('.', '.git')):
|
||||
revision = git.get_svn_revision()
|
||||
else:
|
||||
raise Exception('Not a valid checkout')
|
||||
|
||||
# calculate api hashes
|
||||
api_hash_calculator = cef_api_hash(cpp_header_dir, verbose = False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user