[Mesa-dev] [PATCH mesa v2 1/3] git_sha1: simplify logic
Emil Velikov
emil.l.velikov at gmail.com
Thu Aug 16 15:08:47 UTC 2018
On 16 August 2018 at 14:24, Eric Engestrom <eric.engestrom at intel.com> wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
> bin/git_sha1_gen.py | 6 +-----
> src/Makefile.am | 2 +-
> src/git_sha1.h.in | 1 -
> src/mesa/Android.libmesa_git_sha1.mk | 2 +-
> 4 files changed, 3 insertions(+), 8 deletions(-)
> delete mode 100644 src/git_sha1.h.in
>
> diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py
> index 77c5fa9d2951c8e10c1c..c6240662df3f6146a57f 100755
> --- a/bin/git_sha1_gen.py
> +++ b/bin/git_sha1_gen.py
> @@ -47,10 +47,6 @@ def write_if_different(contents):
>
> 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('')
Nice call - one file less, no fancy handling, all data side-by-side.
For the series:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Thank you
Emil
More information about the mesa-dev
mailing list