diff options
author | James Moger <james.moger@gmail.com> | 2013-04-10 09:56:03 -0400 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2013-04-10 10:30:52 -0400 |
commit | 499c0be0c732f9b4c472540bb0fe09b356d9146a (patch) | |
tree | 42bb9afd182bcd73cca7290597eaf394440cc1c7 | |
parent | 2620640fabf81372e9dd57ca275297b96f8ddfbe (diff) | |
download | iciql-499c0be0c732f9b4c472540bb0fe09b356d9146a.tar.gz iciql-499c0be0c732f9b4c472540bb0fe09b356d9146a.zip |
Added release process script template
-rw-r--r-- | build.xml | 23 | ||||
-rw-r--r-- | release.template | 115 |
2 files changed, 138 insertions, 0 deletions
@@ -259,6 +259,29 @@ </tag>
</mx:commit>
+ <!-- create the release process script -->
+ <mx:if>
+ <os family="windows" />
+ <then>
+ <!-- Windows PowerShell script -->
+ <!-- set-executionpolicy remotesigned -->
+ <property name="recipe" value="release_${project.version}.ps1" />
+ </then>
+ <else>
+ <!-- Bash script -->
+ <property name="recipe" value="release_${project.version}.sh" />
+ </else>
+ </mx:if>
+ <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />
+ <!-- Work-around for lack of proper ant property substitution in copy -->
+ <property name="dollar" value="$"/>
+ <copy file="release.template" tofile="${recipe}">
+ <filterset begintoken="${dollar}{" endtoken="}">
+ <filter token="project.version" value="${project.version}" />
+ <filter token="project.commitId" value="${project.commitId}" />
+ </filterset>
+ </copy>
+
<!-- next cycle -->
<mx:version stage="snapshot" incrementNumber="minor" dryrun="${dryrun}" />
<mx:commit showtitle="no">
diff --git a/release.template b/release.template new file mode 100644 index 0000000..7b5460d --- /dev/null +++ b/release.template @@ -0,0 +1,115 @@ +#!/bin/bash
+#
+# ${project.version} release script
+#
+
+# go back one commit to RELEASE commit
+echo ""
+echo "************************************************************************"
+echo "Checking out ${project.version} RELEASE commit ${project.commitId}"
+echo "************************************************************************"
+echo ""
+git checkout ${project.commitId}
+
+# submodules operate on a detached HEAD so we first checkout and pull master
+echo ""
+echo "************************************************************************"
+echo "Preparing Maven submodule"
+echo "************************************************************************"
+echo ""
+cd maven
+git checkout master
+git pull
+cd ..
+
+# build RELEASE artifacts, this will deploy artifacts into maven folder
+echo ""
+echo "************************************************************************"
+echo "Building ${project.version} RELEASE artifacts"
+echo "************************************************************************"
+echo ""
+ant
+
+# commit all generated artifacts and metadata in submodule
+echo ""
+echo "************************************************************************"
+echo "Committing Maven submodule ${project.version} RELEASE artifacts"
+echo "************************************************************************"
+echo ""
+cd maven
+git add .
+git commit -m "${project.version} artifacts"
+cd ..
+
+# Update master branch Maven submodule repository reference
+echo ""
+echo "************************************************************************"
+echo "Updating master for Maven submodule ${project.version} RELEASE artifacts"
+echo "************************************************************************"
+echo ""
+git checkout master
+git add maven
+git commit -m "updated Maven submodule repository to ${project.version}"
+
+# Update gh-pages branch Maven submodule repository reference
+echo ""
+echo "************************************************************************"
+echo "Updating gh-pages for Maven submodule ${project.version} RELEASE artifacts"
+echo "************************************************************************"
+echo ""
+git checkout gh-pages
+git add maven
+git commit -m "updated Maven submodule repository to ${project.version}"
+
+# return to release commit
+echo ""
+echo "************************************************************************"
+echo "Checking out ${project.version} RELEASE commit ${project.commitId}"
+echo "************************************************************************"
+echo ""
+git checkout ${project.commitId}
+
+# upload artifacts
+echo ""
+echo "************************************************************************"
+echo "Uploading ${project.version} artifacts"
+echo "************************************************************************"
+echo ""
+ant uploadArtifacts
+
+# build site, update gh-pages, and ftp upload site to hosting provider
+echo ""
+echo "************************************************************************"
+echo "Building ${project.version} website"
+echo "************************************************************************"
+echo ""
+ant publishSite
+
+# return to project master
+echo ""
+echo "************************************************************************"
+echo "Checking out master"
+echo "************************************************************************"
+echo ""
+git checkout master
+
+# push Maven submodule to origin
+echo ""
+echo "************************************************************************"
+echo "Pushing Maven submodule"
+echo "************************************************************************"
+echo ""
+cd maven
+git push origin master
+cd ..
+
+# push project branches
+echo ""
+echo "************************************************************************"
+echo "Pushing master and gh-pages"
+echo "************************************************************************"
+echo ""
+git push origin master gh-pages
+
+# update the Maven submodule reference
+git submodule update
|