contrib/gn/foo.patch

40 lines
1.2 KiB
Diff

--- build/gen.py.orig 2019-10-24 18:38:23.121474871 +0200
+++ build/gen.py 2019-10-24 18:38:45.849743261 +0200
@@ -125,35 +125,7 @@
def GenerateLastCommitPosition(host, header):
- ROOT_TAG = 'initial-commit'
- describe_output = subprocess.check_output(
- ['git', 'describe', 'HEAD', '--match', ROOT_TAG], shell=host.is_windows(),
- cwd=REPO_ROOT)
- mo = re.match(ROOT_TAG + '-(\d+)-g([0-9a-f]+)', describe_output.decode())
- if not mo:
- raise ValueError(
- 'Unexpected output from git describe when generating version header')
-
- contents = '''// Generated by build/gen.py.
-
-#ifndef OUT_LAST_COMMIT_POSITION_H_
-#define OUT_LAST_COMMIT_POSITION_H_
-
-#define LAST_COMMIT_POSITION "%s (%s)"
-
-#endif // OUT_LAST_COMMIT_POSITION_H_
-''' % (mo.group(1), mo.group(2))
-
- # Only write/touch this file if the commit position has changed.
- old_contents = ''
- if os.path.isfile(header):
- with open(header, 'r') as f:
- old_contents = f.read()
-
- if old_contents != contents:
- with open(header, 'w') as f:
- f.write(contents)
-
+ return 0
def WriteGenericNinja(path, static_libraries, executables,
cc, cxx, ar, ld, platform, host, options,