Skip to content
Browse files

Do the whole build (except the commit) at once.

  • Loading branch information...
1 parent 90e3621 commit aee4682dd5bc46afdb653aaf8fffa7ffd84dbf73 @tomfaulhaber committed Nov 9, 2009
Showing with 18 additions and 6 deletions.
  1. +11 −4 build.xml
  2. +2 −1 com/infolace/gen_docs/ant_wrapper.clj
  3. +1 −0 com/infolace/gen_docs/build_html.clj
  4. +1 −1 do-build.sh
  5. +3 −0 html-only.sh
View
15 build.xml
@@ -195,22 +195,29 @@
<!-- roll-up targets -->
<target name="commit-result" depends="set-commit-comment,commit-html,update-last-commit"/>
+ <!-- reset to: depends="build-src,build-html,commit-result" -->
<target name="do-build"
- depends="build-src,build-html,commit-result"
+ depends="build-src,build-html"
description="once everything is up-to-date, build the source, build the html, then commit the new documentation"/>
- <target name="all" depends="pull-src, set-is-uptodate"
+ <target name="main-build" depends="pull-src, set-is-uptodate"
if="do-build"
description="Update the html on github based on the latest source, if appropriate">
<antcall target="do-build"/>
</target>
- <target name="ant-test" description="testing ant">
+ <target name="all">
+ <property name="build-target" value="main-build"/>
+ <antcall target="ant-wrapper"/>
+ </target>
+
+ <target name="ant-wrapper"
+ description="do a pass-through to clojure so that it can set various project-specific params">
<java classname="clojure.main"
classpath="${clojure-jar}:../clojure-contrib/clojure-contrib.jar:${clojure-contrib-classes}:${ant-jar}:${ant-launcher-jar}:/usr/lib/jvm/java-6-sun-1.6.0.07/lib/tools.jar:/usr/share/java/ant-nodeps.jar:."
fork="true" failonerror="true">
<arg value="-e"/>
- <arg value="(use 'com.infolace.gen-docs.ant-wrapper) (ant-wrapper &quot;${param-dir}&quot; &quot;${build-target}&quot;)"/>
+ <arg value="(use 'com.infolace.gen-docs.ant-wrapper) (ant-wrapper &quot;${param-dir}&quot; &quot;${build-target}&quot; ${force})"/>
</java>
</target>
View
3 com/infolace/gen_docs/ant_wrapper.clj
@@ -11,7 +11,7 @@
'built-clojure-jar '*built-clojure-jar*})
(defn ant-wrapper
- [param-dir build-target]
+ [param-dir build-target force]
(load (str param-dir "/params"))
(let [p (Project.)
helper (ProjectHelper/getProjectHelper)
@@ -24,6 +24,7 @@
(.setMessageOutputLevel Project/MSG_INFO)))
(.setUserProperty "ant.file" (.getAbsolutePath build-file))
(.setUserProperty "param-dir" param-dir)
+ (.setUserProperty "force" (if force "true" "false"))
(.init)
(.addReference "ant.projectHelper" helper))
(doseq [item param-map]
View
1 com/infolace/gen_docs/build_html.clj
@@ -212,6 +212,7 @@ partial html data leaving a vector of nodes which we then wrap in a <div> tag"
do this for source links so that we don't change them with every commit (unless that file
actually changed). This reduces the amount of random doc file changes that happen."
[file]
+ (cl-format true "file=~a, dir=~a~%" file (str *src-dir* "/" *src-root*))
(dosync
(if-let [hash (get @commit-hash-cache file)]
hash
View
2 do-build.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-ant -Dparam-dir=params/clojure -Dbuild-target=build-html ant-test
+ant -Dparam-dir=params/clojure -Dforce=true
View
3 html-only.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ant -Dparam-dir=params/clojure -Dbuild-target=build-html ant-wrapper

0 comments on commit aee4682

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