debug update.sh

This commit is contained in:
2025-07-31 18:23:51 +02:00
parent 7f66ca4ca3
commit d0a7042324
3 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ if [ "$current_hash" != "$latest_hash" ]; then
maj_count=$(curl -s "https://api.github.com/repos/NixOS/nixpkgs/compare/${current_hash}...${latest_hash}" | jq -r '.ahead_by // 0' 2>/dev/null || echo "?")
# Date du commit distant
remote_commit_date=$(curl -s https://api.github.com/repos/NixOS/nixpkgs/commits/c87b95e25065c028d31a94f06a62927d18763fdf | jq -r '.commit.author.date')
remote_commit_date=$(curl -s https://api.github.com/repos/NixOS/nixpkgs/commits/"${latest_hash}" | jq -r '.commit.author.date')
remote_commit_date=$(date -d "${remote_commit_date}" "+%d/%m/%Y à %H:%M")
printf '{"text": "%s ", "tooltip": "Commit distant : %s\\nCommit local : %s"}' "${maj_count}" "${remote_commit_date}" "${local_commit_date}"
# Compter les commits entre les deux