summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-06-09 19:06:09 -0400
committerJames Moger <james.moger@gitblit.com>2011-06-09 19:06:09 -0400
commit81f881a10f2c8456cc4ebfa26327e15655db4646 (patch)
tree6cd76c51f4fe6c9b790472f7248855ff5ebe7b46
parentf339f5de2ee6d354f55e14e9340bebc4611535b3 (diff)
downloadgitblit-81f881a10f2c8456cc4ebfa26327e15655db4646.tar.gz
gitblit-81f881a10f2c8456cc4ebfa26327e15655db4646.zip
Build script improvements for release management.
-rw-r--r--.gitignore1
-rw-r--r--build.xml36
-rw-r--r--docs/doc_footer.html (renamed from docs/page_footer.html)0
-rw-r--r--docs/doc_header.html39
-rw-r--r--docs/site_footer.html7
-rw-r--r--docs/site_header.html (renamed from docs/page_header.html)0
-rw-r--r--src/com/gitblit/Build.java8
7 files changed, 85 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 87e1b32c..1819e8ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/site
/git
/target
+/build.properties
diff --git a/build.xml b/build.xml
index 7b22a6ba..c41b788a 100644
--- a/build.xml
+++ b/build.xml
@@ -6,9 +6,12 @@
<property name="project.mainclass" value="com.gitblit.Launcher" />
<property name="project.build.dir" value="${basedir}/build" />
- <target name="main">
+ <loadproperties srcfile="${basedir}/build.properties" />
- <!-- build dsate -->
+ <!-- Build Gitblit -->
+ <target name="main" description="Compiles Gitblit from source to website">
+
+ <!-- build date -->
<tstamp>
<format property="gb.buildDate" pattern="yyyy-MM-dd" />
</tstamp>
@@ -70,7 +73,7 @@
<include name="*.jar" />
</fileset>
</path>
- <javac destdir="${project.build.dir}">
+ <javac destdir="${project.build.dir}" failonerror="false">
<src path="${basedir}/src" />
<classpath refid="master-classpath" />
</javac>
@@ -158,10 +161,10 @@
<arg value="${basedir}/site" />
<arg value="--pageHeader" />
- <arg value="${basedir}/docs/page_header.html" />
+ <arg value="${basedir}/docs/site_header.html" />
<arg value="--pageFooter" />
- <arg value="${basedir}/docs/page_footer.html" />
+ <arg value="${basedir}/docs/site_footer.html" />
<arg value="--alias" />
<arg value="index=overview" />
@@ -274,7 +277,7 @@
<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
</java>
-
+
<!-- Create Zip deployment -->
<property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
<zip destfile="${distribution.zipfile}">
@@ -295,4 +298,25 @@
<!-- Cleanup -->
<delete dir="${project.build.dir}" />
</target>
+
+
+ <!-- Publish site to hosting service -->
+ <!-- You must add ext/commons-net-1.4.0.jar to your ANT classpath. -->
+ <target name="publishSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)">
+ <ftp server="${ftp.server}"
+ userid="${ftp.user}"
+ password="${ftp.password}"
+ remotedir="${ftp.dir}"
+ passive="true"
+ verbose="yes">
+ <fileset dir="${basedir}/site" />
+ </ftp>
+ </target>
+
+
+ <!-- Publish distribution to github -->
+ <target name="publishDistribution" description="Publish the Gitblit distribution to Github">
+ <!-- TODO -->
+ <!-- https://github.com/oyvindkinsey/GitHubUploadTask -->
+ </target>
</project>
diff --git a/docs/page_footer.html b/docs/doc_footer.html
index e1a57381..e1a57381 100644
--- a/docs/page_footer.html
+++ b/docs/doc_footer.html
diff --git a/docs/doc_header.html b/docs/doc_header.html
new file mode 100644
index 00000000..71ba8415
--- /dev/null
+++ b/docs/doc_header.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Gitblit</title>
+ <link rel="stylesheet" type="text/css" href="./gitblit.css"/>
+ <link rel="stylesheet" type="text/css" href="./markdown.css"/>
+ <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />
+ <meta name="ROBOTS" content="INDEX, NOFOLLOW">
+ <meta http-equiv="imagetoolbar" content="no" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="keywords" content="java git server" />
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
+ <script>
+ !window.jQuery && document.write('<script src="./fancybox/jquery-1.4.3.min.js"><\/script>');
+ </script>
+ <script type="text/javascript" src="./fancybox/query.mousewheel-3.0.4.pack.js"></script>
+ <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>
+ <link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />
+
+ <script type="text/javascript" src="./screenshots.js"></script>
+ <style>
+ ul.noBullets '{'
+ list-style: none;
+ '}'
+ </style>
+
+ <script type="text/javascript" src="prettify/prettify.js"></script>
+ <link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
+ </head>
+ <body style="width:900px" onload="prettyPrint()">
+ <div class="page_header">
+ <a title="gitblit homepage" href="http://gitblit.com/">
+ <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
+ </a>
+ <span style="color:black;">{0}</span>
+ </div>
+ <div class="page_nav">{1}</div>
+ <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
index 00000000..e1a57381
--- /dev/null
+++ b/docs/site_footer.html
@@ -0,0 +1,7 @@
+ </div>
+ <div style="margin-top:10px" class="page_footer">
+ <div style="float:right;">{0}</div>
+ 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>.
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/docs/page_header.html b/docs/site_header.html
index 7b8f63d5..7b8f63d5 100644
--- a/docs/page_header.html
+++ b/docs/site_header.html
diff --git a/src/com/gitblit/Build.java b/src/com/gitblit/Build.java
index 3948fd18..a98169e5 100644
--- a/src/com/gitblit/Build.java
+++ b/src/com/gitblit/Build.java
@@ -85,6 +85,9 @@ public class Build {
downloadFromEclipse(MavenObject.JGIT, BuildType.COMPILETIME);
downloadFromEclipse(MavenObject.JGIT_HTTP, BuildType.COMPILETIME);
+
+ // needed for site publishing
+ downloadFromApache(MavenObject.COMMONSNET, BuildType.RUNTIME);
}
public static void buildSettingKeys() {
@@ -394,6 +397,11 @@ public class Build {
"e528f593b19b04d500992606f58b87fcfded8883",
"d0ffadd0a4ab909d94a577b5aad43c13b617ddcb");
+ public static final MavenObject COMMONSNET = new MavenObject("commons-net", "commons-net", "commons-net",
+ "1.4.0", 181000, 0, 0, "eb47e8cad2dd7f92fd7e77df1d1529cae87361f7",
+ "",
+ "");
+
public final String name;
public final String group;
public final String artifact;