Browse Source

Added maintaining a Maven repository to the build release process

tags/v1.3.2
James Moger 10 years ago
parent
commit
f12685abf0
3 changed files with 47 additions and 1 deletions
  1. 1
    0
      build.moxie
  2. 14
    1
      build.xml
  3. 32
    0
      release.template

+ 1
- 0
build.moxie View File

@@ -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:

+ 14
- 1
build.xml View File

@@ -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" />

+ 32
- 0
release.template View File

@@ -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 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

Loading…
Cancel
Save