aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/repos/scripts/fetch-repos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'services/repos/scripts/fetch-repos.sh')
-rwxr-xr-xservices/repos/scripts/fetch-repos.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/repos/scripts/fetch-repos.sh b/services/repos/scripts/fetch-repos.sh
index 55c29b2..ce9105b 100755
--- a/services/repos/scripts/fetch-repos.sh
+++ b/services/repos/scripts/fetch-repos.sh
@@ -7,5 +7,13 @@ for repo_path in repos/*; do
repo_name=$(basename "$repo_path" .git)
echo "Fetching $repo_name"
git -C "$repo_path" fetch --tags --prune origin
+
+ # Update agefile.
+ mkdir -p "$repo_path/info/web"
+ git -C "$repo_path" for-each-ref \
+ --sort=-committerdate \
+ --format='%(committerdate:format:%Y-%m-%d %H:%M:%S)' \
+ refs/ \
+ | head -1 > "$repo_path/info/web/last-modified"
fi
done