summaryrefslogtreecommitdiffstats
path: root/bin/git_sha1_gen.py
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-08-16 14:02:44 +0100
committerEric Engestrom <[email protected]>2018-08-16 17:38:31 +0100
commit471f708ed6f4787813d0656c2457a6fc5738ddfc (patch)
tree8dae8406c42b5eda9f781b7aafa90793a5ada72c /bin/git_sha1_gen.py
parent9a6a6317629eb4c63d28860ded30778ac341ac63 (diff)
git_sha1: simplify logic
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'bin/git_sha1_gen.py')
-rwxr-xr-xbin/git_sha1_gen.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py
index 77c5fa9d295..c6240662df3 100755
--- a/bin/git_sha1_gen.py
+++ b/bin/git_sha1_gen.py
@@ -47,10 +47,6 @@ args = parser.parse_args()
git_sha1 = os.environ.get('MESA_GIT_SHA1_OVERRIDE', get_git_sha1())[:10]
if git_sha1:
- git_sha1_h_in_path = os.path.join(os.path.dirname(sys.argv[0]),
- '..', 'src', 'git_sha1.h.in')
- with open(git_sha1_h_in_path, 'r') as git_sha1_h_in:
- new_sha1 = git_sha1_h_in.read().replace('@VCS_TAG@', git_sha1)
- write_if_different(new_sha1)
+ write_if_different('#define MESA_GIT_SHA1 "git-' + git_sha1 + '"')
else:
write_if_different('')