James Moger
2013-07-25 f12685abf02e2f24b372786c8be9bdcda86c1ab4
Added maintaining a Maven repository to the build release process
3 files modified
48 ■■■■■ changed files
build.moxie 1 ●●●● patch | view | raw | blame | history
build.xml 15 ●●●●● patch | view | raw | blame | history
release.template 32 ●●●●● patch | view | raw | blame | history
build.moxie
@@ -22,6 +22,7 @@
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:
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" />
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 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -18,6 +29,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 ""
@@ -43,6 +65,16 @@
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 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"