Hash :
50d8a2af
Author :
Date :
2021-12-06T11:35:08
Remove Skia Gold master usage Removes _GetGitOriginMasterHeadSha1 in the Skia Gold Python code since _GetGitOriginMainHeadSha1 is now used in the base Chromium code. Bug: chromium:1276531 Change-Id: I8f5b793b21ba6ff0e4110a3259becc2aaec06443 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3318581 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
# Copyright 2020 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ANGLE implementation of //build/skia_gold_common/skia_gold_properties.py."""
import os
import sys
import subprocess
import sys
d = os.path.dirname
THIS_DIR = d(os.path.abspath(__file__))
ANGLE_SRC_DIR = d(d(d(THIS_DIR)))
sys.path.insert(0, os.path.join(ANGLE_SRC_DIR, 'build'))
CHROMIUM_SRC_DIR = d(d(ANGLE_SRC_DIR))
sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'build'))
from skia_gold_common import skia_gold_properties
class ANGLESkiaGoldProperties(skia_gold_properties.SkiaGoldProperties):
@staticmethod
def _GetGitOriginMainHeadSha1():
try:
return subprocess.check_output(['git', 'rev-parse', 'origin/main'],
shell=_IsWin(),
cwd=ANGLE_SRC_DIR).strip()
except subprocess.CalledProcessError:
return None
def _IsWin():
return sys.platform == 'win32'