Bug 1343336 - Include the upstream commit date in the fdlibm Mozilla README. r=bbouvier
authorTom Ritter <tom@mozilla.com>
Tue, 28 Feb 2017 14:33:18 -0600
changeset 374553 3575e9555c041a76a982292bf23d20a2f575cce6
parent 374552 94047c88a870ad72ae864a16c695ed8a825ffb22
child 374554 81930cfe918203caf05bda79bb9d01ec617c0f55
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1343336
milestone54.0a1
Bug 1343336 - Include the upstream commit date in the fdlibm Mozilla README. r=bbouvier MozReview-Commit-ID: 1tROG2vpdqH
modules/fdlibm/README.mozilla
modules/fdlibm/update.sh
--- a/modules/fdlibm/README.mozilla
+++ b/modules/fdlibm/README.mozilla
@@ -6,12 +6,12 @@ Upstream code can be viewed at
 
 Each file is downloaded separately, as cloning whole repository takes so much
 resources.
 
 The in-tree copy is updated by running
   sh update.sh
 from within the modules/fdlibm directory.
 
-Current version: [commit f2287da07ac7a26ac08745cac66eec82ab9ba384].
+Current version: [commit f2287da07ac7a26ac08745cac66eec82ab9ba384 (2016-09-04T12:01:32Z)].
 
 patches 01-14 fixes files to be usable within mozilla-central tree.
 See https://bugzilla.mozilla.org/show_bug.cgi?id=933257
--- a/modules/fdlibm/update.sh
+++ b/modules/fdlibm/update.sh
@@ -6,30 +6,35 @@
 set -e
 
 API_BASE_URL=https://api.github.com/repos/freebsd/freebsd
 
 get_commit() {
     curl -s "${API_BASE_URL}/commits?path=lib/msun/src&per_page=1" \
         | python -c 'import json, sys; print(json.loads(sys.stdin.read())[0]["sha"])'
 }
+get_date() {
+    curl -s "${API_BASE_URL}/commits?path=lib/msun/src&per_page=1" \
+        | python -c 'import json, sys; print(json.loads(sys.stdin.read())[0]["commit"]["committer"]["date"])'
+}
 
 mv ./src/moz.build ./src_moz.build
 rm -rf src
 BEFORE_COMMIT=$(get_commit)
 sh ./import.sh
 mv ./src_moz.build ./src/moz.build
 COMMIT=$(get_commit)
+COMMITDATE=$(get_date)
 if [ ${BEFORE_COMMIT} != ${COMMIT} ]; then
     echo "Latest commit is changed during import.  Please run again."
     exit 1
 fi
 for FILE in $(ls patches/*.patch | sort); do
     patch -p3 < ${FILE}
 done
 hg add src
 
-perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[commit ${COMMIT}]/" README.mozilla
+perl -p -i -e "s/\[commit [0-9a-f]{40} \(.{1,100}\)\]/[commit ${COMMIT} (${COMMITDATE})]/" README.mozilla
 
 echo "###"
 echo "### Updated fdlibm/src to ${COMMIT}."
 echo "### Remember to verify and commit the changes to source control!"
 echo "###"