]> source.dussan.org Git - gitblit.git/commitdiff
Build script improvements for release management.
authorJames Moger <james.moger@gitblit.com>
Thu, 9 Jun 2011 23:06:09 +0000 (19:06 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 9 Jun 2011 23:06:09 +0000 (19:06 -0400)
.gitignore
build.xml
docs/doc_footer.html [new file with mode: 0644]
docs/doc_header.html [new file with mode: 0644]
docs/page_footer.html [deleted file]
docs/page_header.html [deleted file]
docs/site_footer.html [new file with mode: 0644]
docs/site_header.html [new file with mode: 0644]
src/com/gitblit/Build.java

index 87e1b32cc42e973d51a456cecb538fb91ddeb30c..1819e8ea18012fd8468e0edc1991a330a7ff685f 100644 (file)
@@ -9,3 +9,4 @@
 /site
 /git
 /target
+/build.properties
index 7b22a6ba15394a7a2f1ddf27b422b1275eb0a9e6..c41b788abd710e256262b7bb8fd354f87a7922bf 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -6,9 +6,12 @@
        <property name="project.mainclass" value="com.gitblit.Launcher" />\r
        <property name="project.build.dir" value="${basedir}/build" />\r
 \r
-       <target name="main">\r
+       <loadproperties srcfile="${basedir}/build.properties" />\r
 \r
-               <!-- build dsate -->\r
+       <!-- Build Gitblit -->\r
+       <target name="main" description="Compiles Gitblit from source to website">\r
+\r
+               <!-- build date -->\r
                <tstamp>\r
                        <format property="gb.buildDate" pattern="yyyy-MM-dd" />\r
                </tstamp>\r
@@ -70,7 +73,7 @@
                                <include name="*.jar" />\r
                        </fileset>\r
                </path>\r
-               <javac destdir="${project.build.dir}">\r
+               <javac destdir="${project.build.dir}" failonerror="false">\r
                        <src path="${basedir}/src" />\r
                        <classpath refid="master-classpath" />\r
                </javac>\r
                        <arg value="${basedir}/site" />\r
 \r
                        <arg value="--pageHeader" />\r
-                       <arg value="${basedir}/docs/page_header.html" />\r
+                       <arg value="${basedir}/docs/site_header.html" />\r
 \r
                        <arg value="--pageFooter" />\r
-                       <arg value="${basedir}/docs/page_footer.html" />\r
+                       <arg value="${basedir}/docs/site_footer.html" />\r
 \r
                        <arg value="--alias" />\r
                        <arg value="index=overview" />\r
                        <arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />\r
 \r
                </java>\r
-\r
+               \r
                <!-- Create Zip deployment -->\r
                <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />\r
                <zip destfile="${distribution.zipfile}">\r
                <!-- Cleanup -->\r
                <delete dir="${project.build.dir}" />\r
        </target>\r
+               \r
+       \r
+       <!-- Publish site to hosting service -->\r
+       <!-- You must add ext/commons-net-1.4.0.jar to your     ANT classpath. -->\r
+       <target name="publishSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)">\r
+               <ftp server="${ftp.server}"\r
+                       userid="${ftp.user}"\r
+                       password="${ftp.password}"\r
+                       remotedir="${ftp.dir}"\r
+                       passive="true"\r
+                       verbose="yes">\r
+               <fileset dir="${basedir}/site" />\r
+               </ftp>\r
+       </target>\r
+               \r
+       \r
+       <!-- Publish distribution to github -->\r
+       <target name="publishDistribution" description="Publish the Gitblit distribution to Github">\r
+               <!-- TODO -->\r
+               <!-- https://github.com/oyvindkinsey/GitHubUploadTask -->\r
+       </target>\r
 </project>\r
diff --git a/docs/doc_footer.html b/docs/doc_footer.html
new file mode 100644 (file)
index 0000000..e1a5738
--- /dev/null
@@ -0,0 +1,7 @@
+       </div>\r
+       <div style="margin-top:10px" class="page_footer">\r
+               <div style="float:right;">{0}</div>\r
+       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/docs/doc_header.html b/docs/doc_header.html
new file mode 100644 (file)
index 0000000..71ba841
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<html>\r
+       <head>\r
+               <title>Gitblit</title>\r
+               <link rel="stylesheet" type="text/css" href="./gitblit.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./markdown.css"/>\r
+               <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />\r
+               <meta name="ROBOTS" content="INDEX, NOFOLLOW">\r
+               <meta http-equiv="imagetoolbar" content="no" />\r
+               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+               <meta name="keywords" content="java git server" />\r
+               \r
+               <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
+               <script>\r
+                       !window.jQuery && document.write('<script src="./fancybox/jquery-1.4.3.min.js"><\/script>');\r
+               </script>\r
+               <script type="text/javascript" src="./fancybox/query.mousewheel-3.0.4.pack.js"></script>\r
+               <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
+               <link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
+               \r
+               <script type="text/javascript" src="./screenshots.js"></script>\r
+               <style>\r
+                       ul.noBullets '{'\r
+                               list-style: none;\r
+                       '}'\r
+               </style>\r
+               \r
+               <script type="text/javascript" src="prettify/prettify.js"></script>\r
+               <link href="prettify/prettify.css" type="text/css" rel="stylesheet" />          \r
+       </head>\r
+       <body style="width:900px"  onload="prettyPrint()">\r
+               <div class="page_header">\r
+                       <a title="gitblit homepage" href="http://gitblit.com/">\r
+                               <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                       </a>\r
+                       <span style="color:black;">{0}</span>\r
+               </div>\r
+               <div class="page_nav">{1}</div>\r
+               <div class="markdown">
\ No newline at end of file
diff --git a/docs/page_footer.html b/docs/page_footer.html
deleted file mode 100644 (file)
index e1a5738..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-       </div>\r
-       <div style="margin-top:10px" class="page_footer">\r
-               <div style="float:right;">{0}</div>\r
-       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
-       </div>\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/docs/page_header.html b/docs/page_header.html
deleted file mode 100644 (file)
index 7b8f63d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
-<html>\r
-       <head>\r
-               <title>Gitblit</title>\r
-               <link rel="stylesheet" type="text/css" href="./gitblit.css"/>\r
-               <link rel="stylesheet" type="text/css" href="./markdown.css"/>\r
-               <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />\r
-               <meta name="ROBOTS" content="INDEX, NOFOLLOW">\r
-               <meta http-equiv="imagetoolbar" content="no" />\r
-               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-               <meta name="keywords" content="java git server" />\r
-               \r
-               <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
-               <script>\r
-                       !window.jQuery && document.write('<script src="./fancybox/jquery-1.4.3.min.js"><\/script>');\r
-               </script>\r
-               <script type="text/javascript" src="./fancybox/query.mousewheel-3.0.4.pack.js"></script>\r
-               <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
-               <link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
-               \r
-               <script type="text/javascript" src="./screenshots.js"></script>\r
-               <style>\r
-                       ul.noBullets '{'\r
-                               list-style: none;\r
-                       '}'\r
-               </style>\r
-               \r
-               <script type="text/javascript" src="prettify/prettify.js"></script>\r
-               <link href="prettify/prettify.css" type="text/css" rel="stylesheet" />          \r
-       </head>\r
-       <body style="width:900px"  onload="prettyPrint()">\r
-               <a href="http://github.com/gitblit"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>\r
-               <div class="page_header">\r
-                       <a title="gitblit homepage" href="http://gitblit.com/">\r
-                               <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
-                       </a>\r
-                       <span style="color:black;">{0}</span>\r
-               </div>\r
-               <div class="page_nav">{1}</div>\r
-               <div class="markdown">
\ No newline at end of file
diff --git a/docs/site_footer.html b/docs/site_footer.html
new file mode 100644 (file)
index 0000000..e1a5738
--- /dev/null
@@ -0,0 +1,7 @@
+       </div>\r
+       <div style="margin-top:10px" class="page_footer">\r
+               <div style="float:right;">{0}</div>\r
+       The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.\r
+       </div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/docs/site_header.html b/docs/site_header.html
new file mode 100644 (file)
index 0000000..7b8f63d
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<html>\r
+       <head>\r
+               <title>Gitblit</title>\r
+               <link rel="stylesheet" type="text/css" href="./gitblit.css"/>\r
+               <link rel="stylesheet" type="text/css" href="./markdown.css"/>\r
+               <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />\r
+               <meta name="ROBOTS" content="INDEX, NOFOLLOW">\r
+               <meta http-equiv="imagetoolbar" content="no" />\r
+               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+               <meta name="keywords" content="java git server" />\r
+               \r
+               <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
+               <script>\r
+                       !window.jQuery && document.write('<script src="./fancybox/jquery-1.4.3.min.js"><\/script>');\r
+               </script>\r
+               <script type="text/javascript" src="./fancybox/query.mousewheel-3.0.4.pack.js"></script>\r
+               <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
+               <link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
+               \r
+               <script type="text/javascript" src="./screenshots.js"></script>\r
+               <style>\r
+                       ul.noBullets '{'\r
+                               list-style: none;\r
+                       '}'\r
+               </style>\r
+               \r
+               <script type="text/javascript" src="prettify/prettify.js"></script>\r
+               <link href="prettify/prettify.css" type="text/css" rel="stylesheet" />          \r
+       </head>\r
+       <body style="width:900px"  onload="prettyPrint()">\r
+               <a href="http://github.com/gitblit"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>\r
+               <div class="page_header">\r
+                       <a title="gitblit homepage" href="http://gitblit.com/">\r
+                               <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
+                       </a>\r
+                       <span style="color:black;">{0}</span>\r
+               </div>\r
+               <div class="page_nav">{1}</div>\r
+               <div class="markdown">
\ No newline at end of file
index 3948fd1843eff86521a0b2ec18166eeedfe9b614..a98169e51d76baa1d821a3212eb80077c2833d29 100644 (file)
@@ -85,6 +85,9 @@ public class Build {
 \r
                downloadFromEclipse(MavenObject.JGIT, BuildType.COMPILETIME);\r
                downloadFromEclipse(MavenObject.JGIT_HTTP, BuildType.COMPILETIME);\r
+               \r
+               // needed for site publishing\r
+               downloadFromApache(MavenObject.COMMONSNET, BuildType.RUNTIME);\r
        }\r
 \r
        public static void buildSettingKeys() {\r
@@ -394,6 +397,11 @@ public class Build {
                                "e528f593b19b04d500992606f58b87fcfded8883",\r
                                "d0ffadd0a4ab909d94a577b5aad43c13b617ddcb");\r
 \r
+               public static final MavenObject COMMONSNET = new MavenObject("commons-net", "commons-net", "commons-net",\r
+                               "1.4.0", 181000, 0, 0, "eb47e8cad2dd7f92fd7e77df1d1529cae87361f7",\r
+                               "",\r
+                               "");\r
+\r
                public final String name;\r
                public final String group;\r
                public final String artifact;\r