diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2016-04-06 17:09:34 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2016-04-06 17:09:34 +0000 |
commit | 497725e65991c80cf0a4e761ba9bcadfcb1979ca (patch) | |
tree | 9f92bc7be508c5f21b45ede5ddbcc36509150ea6 /emulators/qemu-cheri | |
parent | 9aa4f57414dec099a2d3bbad0b6e77f8d43bd1e3 (diff) | |
download | ports-497725e65991c80cf0a4e761ba9bcadfcb1979ca.tar.gz ports-497725e65991c80cf0a4e761ba9bcadfcb1979ca.zip |
Update to an April 5th snapshot.
Notes
Notes:
svn path=/head/; revision=412634
Diffstat (limited to 'emulators/qemu-cheri')
-rw-r--r-- | emulators/qemu-cheri/Makefile.snapshot | 4 | ||||
-rw-r--r-- | emulators/qemu-cheri/distinfo | 4 | ||||
-rw-r--r-- | emulators/qemu-cheri/files/gen-Makefile.snapshot.sh | 33 |
3 files changed, 32 insertions, 9 deletions
diff --git a/emulators/qemu-cheri/Makefile.snapshot b/emulators/qemu-cheri/Makefile.snapshot index d45fcd46b6ff..438eb7a5af0c 100644 --- a/emulators/qemu-cheri/Makefile.snapshot +++ b/emulators/qemu-cheri/Makefile.snapshot @@ -4,6 +4,6 @@ # # Generated by: files/gen-Makefile.snapshot.sh. # -SNAPDATE= 20160310 +SNAPDATE= 20160405 -QEMU_COMMIT= d348332f2be05d2811a382be5a4f2b445d62db3f +QEMU_COMMIT= 5d1f1bf1d043e871212f785d3e67890c47dcb499 diff --git a/emulators/qemu-cheri/distinfo b/emulators/qemu-cheri/distinfo index 04e31c24da22..573c19e01352 100644 --- a/emulators/qemu-cheri/distinfo +++ b/emulators/qemu-cheri/distinfo @@ -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 diff --git a/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh b/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh index 5db184008314..0bf4935790ef 100644 --- a/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh +++ b/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh @@ -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 |