Variables
Within hook commands, you can reference variables using the following syntax:
${{ }}
These variables are only available in the following functions:
tsndep install
tsndep update
In other words, they can only be used inside hooks.
Available Variables (Update & Install)
-
repo.root
The directory where the git clone command is executed.
-
os.sep
The operating system path separator:
\ on Windows
/ on Linux/macOS
How It Works
When variables are defined within commands, they are automatically replaced with their corresponding values at runtime.
Internal example:
cmd: str = ctx_rep.Translate(item["command"])
Examples
1. Install dependencies
pip install -r "${{repo.root}}${{os.sep}}TSNDep${{os.sep}}requirements.txt"
2. Update dependencies
pip install -r "${{repo.root}}${{os.sep}}TSNDep${{os.sep}}requirements.txt" --upgrade