diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | rh/hooks.py | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -113,6 +113,7 @@ force your own quote handling. Some variables are available to make it easier to handle OS differences. These are automatically expanded for you: +* `${REPO_PATH}`: The path to the project relative to the root. * `${REPO_ROOT}`: The absolute path of the root of the repo checkout. If the project is in a submanifest, this points to the root of the submanifest. * `${REPO_OUTER_ROOT}`: The absolute path of the root of the repo checkout. diff --git a/rh/hooks.py b/rh/hooks.py index 4069b02..acf72af 100644 --- a/rh/hooks.py +++ b/rh/hooks.py @@ -129,6 +129,11 @@ class Placeholders(object): return [x.file for x in self.diff if x.status != 'D'] @property + def var_REPO_PATH(self): + """The path to the project relative to the root""" + return os.environ.get('REPO_PATH', '') + + @property def var_REPO_ROOT(self): """The root of the repo (sub-manifest) checkout.""" return rh.git.find_repo_root() |