clan-cli: add git.commit_file() to auto commit files if inside a git

- commit only if inside a git repo
- commit only the specified file and nothing else
- auto-generate commit message if not specified
This commit is contained in:
DavHau
2023-09-21 14:07:54 +02:00
parent 8e157f891f
commit 6a359c0a2f
8 changed files with 131 additions and 5 deletions

View File

@@ -20,6 +20,7 @@
, rsync
, pkgs
, ui-assets
, lib
}:
let
@@ -92,6 +93,9 @@ python3.pkgs.buildPythonPackage {
chmod +w -R ./src
cd ./src
# git is needed for test_git.py
export PATH="${lib.makeBinPath [pkgs.git]}:$PATH"
export NIX_STATE_DIR=$TMPDIR/nix IN_NIX_SANDBOX=1
${checkPython}/bin/python -m pytest -m "not impure" -s ./tests
touch $out