Skip to content
This repository
Browse code

First change log

  • Loading branch information...
commit 22d6abe24b4152921b5a9d207d0bbc173d4acc82 1 parent e9949b3
Nicholas C. Zakas authored November 22, 2011

Showing 2 changed files with 44 additions and 2 deletions. Show diff stats Hide diff stats

  1. 2  ant.properties
  2. 44  build.xml
2  ant.properties
@@ -15,7 +15,7 @@ class.version = 1.5
15 15
 
16 16
 #CSSEmbed properties
17 17
 cssembed.name = cssembed
18  
-cssembed.version = 0.4.0
  18
+cssembed.version = 0.4.5
19 19
 cssembed.jar = ${cssembed.name}-${cssembed.version}.jar
20 20
 cssembed.main = net.nczonline.web.cssembed.CSSEmbed
21 21
 
44  build.xml
@@ -12,7 +12,49 @@
12 12
     <target name="-init" depends="-load.properties">
13 13
         <mkdir dir="${build.dir}"/>
14 14
     </target>
15  
- 
  15
+
  16
+    <!-- get a timestamp -->
  17
+    <tstamp>
  18
+      <format property="RIGHT_NOW"
  19
+              pattern="d-MMMM-yyyy hh:mm:ss"
  20
+              locale="en,US"/>
  21
+    </tstamp>
  22
+    <tstamp>
  23
+      <format property="SIMPLE_DATE"
  24
+              pattern="MMMM d, yyyy"
  25
+              locale="en,US"/>
  26
+    </tstamp>
  27
+
  28
+    <target name="changelog.update">
  29
+        <exec executable="git" failonerror="true" outputproperty="git.tag">
  30
+            <arg line="tag"/>
  31
+        </exec>
  32
+        <script language="javascript"><![CDATA[
  33
+            //get the most recent tag to get the diff
  34
+            var tags = csslint.getProperty("git.tag").replace("\r", "").split("\n"),
  35
+                lastTag = tags[tags.length-1];
  36
+            csslint.setProperty("git.log.range", lastTag + "..HEAD");
  37
+        ]]></script>
  38
+
  39
+        <!-- git log -pretty=format:'* %s (%an)' v0.4.0..v0.5.0-->
  40
+        <exec executable="git" failonerror="true" outputproperty="git.changelog">
  41
+            <arg line="log --pretty=format:'* %s (%an)' ${git.log.range}"/>
  42
+        </exec>
  43
+
  44
+        <concat destfile="CHANGELOG.tmp"  fixlastline="true">
  45
+            <header trimleading="yes">${SIMPLE_DATE} - v${csslint.version}
  46
+
  47
+            ${git.changelog}
  48
+
  49
+            </header>
  50
+            <fileset dir="." includes="CHANGELOG" />
  51
+        </concat>
  52
+
  53
+        <delete file="CHANGELOG"/>
  54
+        <move file="CHANGELOG.tmp" tofile="CHANGELOG"/>
  55
+
  56
+    </target>
  57
+
16 58
     <target name="build.classes" depends="-init">
17 59
         <mkdir dir="${build.dir}/classes"/>
18 60
         <javac srcdir="${src.dir}"

0 notes on commit 22d6abe

Please sign in to comment.
Something went wrong with that request. Please try again.