f4a5fc7af0
Add Git recipe module to easily use this version of Git anywhere. This fixes recipe bundling and unblocks the recipe roll. Bug: skia: Change-Id: Ib4d1361b7a52676e1992025b29e630ea3ada173b Reviewed-on: https://skia-review.googlesource.com/18833 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
19 lines
554 B
Python
19 lines
554 B
Python
# Copyright 2017 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
|
|
from recipe_engine import recipe_api
|
|
|
|
|
|
class GitApi(recipe_api.RecipeApi):
|
|
def env(self):
|
|
"""Add Git to PATH
|
|
|
|
Requires the infra/git and infra/tools/git CIPD packages to be installed
|
|
in the 'git' relative path.
|
|
"""
|
|
git_dir = self.m.path['start_dir'].join('git')
|
|
git_bin = git_dir.join('bin')
|
|
return self.m.env({'PATH': '%s:%s:%%(PATH)s' % (git_dir, git_bin)})
|