svn commit: r412634 - in head/emulators/qemu-cheri: . files
Brooks Davis
brooks at FreeBSD.org
Wed Apr 6 17:09:36 UTC 2016
Author: brooks
Date: Wed Apr 6 17:09:34 2016
New Revision: 412634
URL: https://svnweb.freebsd.org/changeset/ports/412634
Log:
Update to an April 5th snapshot.
Modified:
head/emulators/qemu-cheri/Makefile.snapshot
head/emulators/qemu-cheri/distinfo
head/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh
Modified: head/emulators/qemu-cheri/Makefile.snapshot
==============================================================================
--- head/emulators/qemu-cheri/Makefile.snapshot Wed Apr 6 16:57:15 2016 (r412633)
+++ head/emulators/qemu-cheri/Makefile.snapshot Wed Apr 6 17:09:34 2016 (r412634)
@@ -4,6 +4,6 @@
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
-SNAPDATE= 20160310
+SNAPDATE= 20160405
-QEMU_COMMIT= d348332f2be05d2811a382be5a4f2b445d62db3f
+QEMU_COMMIT= 5d1f1bf1d043e871212f785d3e67890c47dcb499
Modified: head/emulators/qemu-cheri/distinfo
==============================================================================
--- head/emulators/qemu-cheri/distinfo Wed Apr 6 16:57:15 2016 (r412633)
+++ head/emulators/qemu-cheri/distinfo Wed Apr 6 17:09:34 2016 (r412634)
@@ -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
Modified: head/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh
==============================================================================
--- head/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh Wed Apr 6 16:57:15 2016 (r412633)
+++ head/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh Wed Apr 6 17:09:34 2016 (r412634)
@@ -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
More information about the svn-ports-head
mailing list