]> source.dussan.org Git - jquery.git/commitdiff
Simplified getting the commit date using git log --pretty. Fixed missing date in...
authorRichard D. Worth <rdworth@gmail.com>
Thu, 8 Apr 2010 01:06:46 +0000 (09:06 +0800)
committerJohn Resig <jeresig@gmail.com>
Wed, 21 Jul 2010 14:47:13 +0000 (22:47 +0800)
Makefile
build.xml

index 612fce1c3dec10eb7953ecb68e7fa4b01c5ba80b..ade631968e03834d499d482a84ccf92f346dca9b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ VER = sed s/@VERSION/${JQ_VER}/
 RHINO = java -jar ${BUILD_DIR}/js.jar
 MINJAR = java -jar ${BUILD_DIR}/google-compiler-20091218.jar
 
-DATE=`git log -1 | grep Date: | sed 's/[^:]*: *//'`
+DATE=`git log -1 --pretty=format:%ad`
 
 all: jquery lint min
        @@echo "jQuery build complete."
index 0aeb476d09dfa68b820759ebb353ef3a8af96e23..ebbcdbe770b51b4b6d6e71b99b038b5111036bd0 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -60,6 +60,9 @@
             <fileset file="src/outro.js" />
         </concat>
        <replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
+               <exec executable="git" outputproperty="date">
+                       <arg line="log -1 --pretty=format:%ad"/>
+               </exec>
                <replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" />
         <echo message="${JQ} built." />
     </target>