mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 09:12:28 +00:00
Add confirmation to git commit and push
This commit is contained in:
@@ -6,6 +6,12 @@ git pull
|
|||||||
update_msg=$(nix flake update 2>&1 | grep -v 'warning:')
|
update_msg=$(nix flake update 2>&1 | grep -v 'warning:')
|
||||||
just rebuild
|
just rebuild
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
|
read -p "Commit and push changes? [yN]? " -r
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
git commit -S -m "nix flake update: $(TZ=UTC date '+%Y-%m-%d %H:%M:%S %Z')
|
git commit -S -m "nix flake update: $(TZ=UTC date '+%Y-%m-%d %H:%M:%S %Z')
|
||||||
|
|
||||||
$update_msg"
|
$update_msg"
|
||||||
|
Reference in New Issue
Block a user