1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Update to an April 5th snapshot.

This commit is contained in:
Brooks Davis 2016-04-06 17:09:34 +00:00
parent 9aa4f57414
commit 497725e659
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=412634
3 changed files with 32 additions and 9 deletions

View File

@ -4,6 +4,6 @@
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
SNAPDATE= 20160310
SNAPDATE= 20160405
QEMU_COMMIT= d348332f2be05d2811a382be5a4f2b445d62db3f
QEMU_COMMIT= 5d1f1bf1d043e871212f785d3e67890c47dcb499

View File

@ -1,2 +1,2 @@
SHA256 (CTSRD-CHERI-qemu-0.d20160310-d348332f2be05d2811a382be5a4f2b445d62db3f_GH0.tar.gz) = 18573bb98de40fd30206bd9bb99a12f064a09a57edb0a426a5df24cc2e4bcd8d
SIZE (CTSRD-CHERI-qemu-0.d20160310-d348332f2be05d2811a382be5a4f2b445d62db3f_GH0.tar.gz) = 11138454
SHA256 (CTSRD-CHERI-qemu-0.d20160405-5d1f1bf1d043e871212f785d3e67890c47dcb499_GH0.tar.gz) = e55d610c2496ffeb8eb17610351d4589490967fd19805729d06ee2a25869605d
SIZE (CTSRD-CHERI-qemu-0.d20160405-5d1f1bf1d043e871212f785d3e67890c47dcb499_GH0.tar.gz) = 11139121

View File

@ -4,12 +4,33 @@
# curl and jq. Uses unauthenticated access which is ratelimited to 60
# queries per hour.
get_repo_sha()
REPOS_URL=https://api.github.com/repos/CTSRD-CHERI
MAX_DATE=1970101
tmpfile=`mktemp -t gen-Makefile.snapshot`
query_repo()
{
curl https://api.github.com/repos/CTSRD-CHERI/$1/branches/qemu-cheri | \
jq -r '.commit.sha'
curl ${REPOS_URL}/$1/branches/qemu-cheri > $tmpfile
# Accumulate the dates of the last commits to find the snapshot date
committime=`jq -r '.commit.commit.committer.date' $tmpfile`
committime=${committime%%T*}
year=${committime%%-*}
month=${committime%-*}
month=${month#*-}
day=${committime##*-}
dateint=${year}${month}${day}
if [ $dateint -gt $MAX_DATE ]; then
export MAX_DATE=$dateint
fi
SHA=`jq -r '.commit.sha' $tmpfile`
}
query_repo qemu
QEMU_COMMIT=$SHA
cat <<EOF > Makefile.snapshot
# \$FreeBSD\$
#
@ -17,7 +38,9 @@ cat <<EOF > Makefile.snapshot
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
SNAPDATE= $(date +%Y%m%d)
SNAPDATE= ${MAX_DATE}
QEMU_COMMIT= $(get_repo_sha qemu)
QEMU_COMMIT= ${QEMU_COMMIT}
EOF
rm -f $tmpfile