1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(niveum-deploy): only deploy clean working directories

this makes niveum-version always display accurate information
This commit is contained in:
2021-04-28 16:10:50 +02:00
parent 7f009cfd08
commit 0f432025ad

View File

@@ -50,7 +50,12 @@ in pkgs.mkShell {
eval "$(${pkgs.nix}/bin/nix-build --no-out-link "${toString ./.}/deploy.nix" -A "$1")"
'';
in pkgs.writers.writeDashBin "niveum-deploy" ''
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${deployCommand} '{1}' ::: "$@"
if [ -z "$(${pkgs.git}/bin/git status --porcelain)" ]; then
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${deployCommand} '{1}' ::: "$@"
else
echo Working directory is dirty. Not deploying.
exit 1
fi
'')
(pkgs.writers.writeDashBin "niveum-status" ''