summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.moxie1
-rw-r--r--build.xml15
-rw-r--r--release.template32
3 files changed, 47 insertions, 1 deletions
diff --git a/build.moxie b/build.moxie
index 38c5c37e..9862f952 100644
--- a/build.moxie
+++ b/build.moxie
@@ -22,6 +22,7 @@ url: 'http://gitblit.com'
issuesUrl: 'http://code.google.com/p/gitblit/issues/list'
socialNetworkUrl: 'https://plus.google.com/114464678392593421684'
forumUrl: 'http://groups.google.com/group/gitblit'
+mavenUrl: 'http://gitblit.github.io/gitblit-maven'
# Licenses section included for POM generation
licenses:
diff --git a/build.xml b/build.xml
index ccbfcfda..35e3192c 100644
--- a/build.xml
+++ b/build.xml
@@ -49,7 +49,8 @@
<property name="authority.zipfile" value="authority-${project.version}.zip" />
<property name="gbapi.zipfile" value="gbapi-${project.version}.zip" />
<property name="express.zipfile" value="express-${project.version}.zip" />
-
+ <property name="maven.directory" value="${basedir}/../gitblit-maven" />
+
<!-- Download links -->
<property name="gc.url" value="http://code.google.com/p/gitblit/downloads/detail?name=" />
</target>
@@ -812,6 +813,16 @@
</target>
+ <!--
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Package and deploy RELEASE artifacts to the Maven repository
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ -->
+ <target name="buildMavenArtifacts" depends="prepare">
+ <mx:package />
+ <mx:deploy basedir="${maven.directory}" allowsnapshots="false" />
+ </target>
+
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -966,6 +977,8 @@
<filter token="project.version" value="${project.version}" />
<filter token="project.commitId" value="${project.commitId}" />
<filter token="project.tag" value="${project.tag}" />
+ <filter token="project.directory" value="${basedir}" />
+ <filter token="maven.directory" value="${maven.directory}" />
</filterset>
</copy>
<chmod file="${recipe}" perm="ugo+rx" />
diff --git a/release.template b/release.template
index 8342bb51..2dd45c8b 100644
--- a/release.template
+++ b/release.template
@@ -3,6 +3,17 @@
# ${project.version} release script
#
+# ensure Maven repository is up-to-date
+echo ""
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo "Preparing Maven repository"
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo ""
+cd ${maven.directory}
+git checkout gh-pages
+git pull
+cd ${project.directory}
+
# go back one commit to RELEASE commit
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -19,6 +30,17 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
ant clean buildAll
+# commit all generated artifacts and metadata
+echo ""
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo "Committing Maven repository ${project.version} RELEASE artifacts"
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo ""
+cd ${maven.directory}
+git add .
+git commit -m "${project.version} artifacts"
+cd ${project.directory}
+
# upload artifacts
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -43,6 +65,16 @@ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
git checkout master
+# push Maven repository to origin
+echo ""
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo "Pushing Maven repository"
+echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+echo ""
+cd ${maven.directory}
+git push origin gh-pages
+cd ${project.directory}
+
# push project branches
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"