Skip to content

Commit

Permalink
Merge pull request #35 from PatrickDaG/main
Browse files Browse the repository at this point in the history
fix: only add deleted files to git
  • Loading branch information
oddlama authored Jul 19, 2024
2 parents d638987 + b8eb9b3 commit 3f1c787
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions apps/generate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,13 @@ in
if [[ "''${KNOWN_SECRETS_SET["$f"]-false}" == false ]]; then
rm -- "$f" || true
REMOVED_ORPHANS=$((REMOVED_ORPHANS + 1))
if [[ "$ADD_TO_GIT" == true ]]; then
git add $f
fi
fi
done
if [[ "''${REMOVED_ORPHANS}" -gt 0 ]]; then
echo " Removed ''${REMOVED_ORPHANS} orphaned files in generation directories"
if [[ "$ADD_TO_GIT" == true ]]; then
git add ${pkgs.lib.concatMapStringsSep " "
(x: escapeShellArg (relativeToFlake x.config.age.rekey.generatedSecretsDir))
nodesWithGeneratedSecretsDir}
fi
fi
)
''

0 comments on commit 3f1c787

Please sign in to comment.