dn42-roagen/update.sh

28 lines
703 B
Bash
Raw Normal View History

#!/bin/bash
ISO_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
2018-12-23 17:21:41 +00:00
# Ensure registry repository is up-to-date
2018-12-26 21:47:45 +00:00
git -C ../registry/ pull upstream master:master --quiet 2>&1
2018-12-23 17:21:41 +00:00
# Checkout master branch in dn42/repository
git -C ../registry/ checkout master --quiet
# Update with data from registry
php roagen.php
php rfc8416.php
# Write out last commit to file
echo "## Last commit
\`\`\`
$(git -C ../registry/ show)
2018-12-23 20:54:29 +00:00
\`\`\`" > roa/README.md
2018-12-14 18:51:54 +00:00
# Commit latest version of ROA files
2018-12-23 17:21:41 +00:00
git add roa/*
git commit roa/* -m "Updated ROA files - $ISO_DATE" --quiet
# Push repository to every remote configured
for REMOTE in $(git remote | egrep -v upstream | paste -sd " " -) ; do git push $REMOTE master:master --quiet ; done