blob: b90d2c38a1d3a19e145cdc007ec7f0156a2f5bf3 [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2021 The PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""PDFium implementation of //build/skia_gold_common/skia_gold_properties.py."""
# pylint: disable=relative-import
import subprocess
import sys
import path_util
from skia_gold_common import skia_gold_properties
class PDFiumSkiaGoldProperties(skia_gold_properties.SkiaGoldProperties):
@staticmethod
def _GetGitOriginMasterHeadSha1():
try:
return subprocess.check_output(['git', 'rev-parse', 'origin/master'],
shell=_IsWin(),
cwd=path_util.GetPDFiumDir()).strip()
except subprocess.CalledProcessError:
return None
def _IsWin():
return sys.platform == 'win32'