pkgs/nixfiles: nixfiles-updated-inputs check if update changes anything
This commit is contained in:
		| @@ -3,7 +3,7 @@ | ||||
| set -euo pipefail | ||||
|  | ||||
| xgit() { | ||||
| 	git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" "$@" | ||||
| 	git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" -c "core.pager=cat" "$@" | ||||
| } | ||||
|  | ||||
| NOW="$(date --utc +%Y-%m-%d-%H-%M)" | ||||
| @@ -25,8 +25,19 @@ nix flake lock --update-input nixpkgs | ||||
|  | ||||
| echo "[!] Commit changes" | ||||
| xgit add flake.lock | ||||
|  | ||||
| xgit commit -m "Update nixpkgs ${NOW}" || true | ||||
|  | ||||
| xgit diff --name-status origin/updated-inputs "${UPDATE_BRANCH}" | ||||
|  | ||||
| echo "[!] biep" | ||||
| if xgit diff --quiet origin/updated-inputs "${UPDATE_BRANCH}" | ||||
| then | ||||
| 	echo "[!] Nothing changed, removing branch" | ||||
| 	xgit branch -D "${UPDATE_BRANCH}" | ||||
| 	exit 0 | ||||
| fi | ||||
|  | ||||
| echo "[!] Publish ${UPDATE_BRANCH}" | ||||
| xgit push --set-upstream origin "${UPDATE_BRANCH}" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user