</tag>\r
</mx:commit>\r
\r
+ <!-- create the release process script -->\r
+ <mx:if>\r
+ <os family="windows" />\r
+ <then>\r
+ <!-- Windows PowerShell script -->\r
+ <!-- set-executionpolicy remotesigned -->\r
+ <property name="recipe" value="release_${project.version}.ps1" />\r
+ </then>\r
+ <else>\r
+ <!-- Bash script -->\r
+ <property name="recipe" value="release_${project.version}.sh" />\r
+ </else>\r
+ </mx:if>\r
+ <delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />\r
+ <!-- Work-around for lack of proper ant property substitution in copy -->\r
+ <property name="dollar" value="$"/>\r
+ <copy file="release.template" tofile="${recipe}">\r
+ <filterset begintoken="${dollar}{" endtoken="}">\r
+ <filter token="project.version" value="${project.version}" />\r
+ <filter token="project.commitId" value="${project.commitId}" />\r
+ </filterset>\r
+ </copy>\r
+\r
<!-- next cycle -->\r
<mx:version stage="snapshot" incrementNumber="minor" dryrun="${dryrun}" />\r
<mx:commit showtitle="no">\r
--- /dev/null
+#!/bin/bash\r
+#\r
+# ${project.version} release script\r
+#\r
+\r
+# go back one commit to RELEASE commit\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Checking out ${project.version} RELEASE commit ${project.commitId}"\r
+echo "************************************************************************"\r
+echo ""\r
+git checkout ${project.commitId}\r
+\r
+# submodules operate on a detached HEAD so we first checkout and pull master\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Preparing Maven submodule"\r
+echo "************************************************************************"\r
+echo ""\r
+cd maven\r
+git checkout master\r
+git pull\r
+cd ..\r
+\r
+# build RELEASE artifacts, this will deploy artifacts into maven folder\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Building ${project.version} RELEASE artifacts"\r
+echo "************************************************************************"\r
+echo ""\r
+ant\r
+\r
+# commit all generated artifacts and metadata in submodule\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Committing Maven submodule ${project.version} RELEASE artifacts"\r
+echo "************************************************************************"\r
+echo ""\r
+cd maven\r
+git add .\r
+git commit -m "${project.version} artifacts"\r
+cd ..\r
+\r
+# Update master branch Maven submodule repository reference\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Updating master for Maven submodule ${project.version} RELEASE artifacts"\r
+echo "************************************************************************"\r
+echo ""\r
+git checkout master\r
+git add maven\r
+git commit -m "updated Maven submodule repository to ${project.version}"\r
+\r
+# Update gh-pages branch Maven submodule repository reference\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Updating gh-pages for Maven submodule ${project.version} RELEASE artifacts"\r
+echo "************************************************************************"\r
+echo ""\r
+git checkout gh-pages\r
+git add maven\r
+git commit -m "updated Maven submodule repository to ${project.version}"\r
+\r
+# return to release commit\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Checking out ${project.version} RELEASE commit ${project.commitId}"\r
+echo "************************************************************************"\r
+echo ""\r
+git checkout ${project.commitId}\r
+\r
+# upload artifacts\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Uploading ${project.version} artifacts"\r
+echo "************************************************************************"\r
+echo ""\r
+ant uploadArtifacts\r
+\r
+# build site, update gh-pages, and ftp upload site to hosting provider\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Building ${project.version} website"\r
+echo "************************************************************************"\r
+echo ""\r
+ant publishSite\r
+\r
+# return to project master\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Checking out master"\r
+echo "************************************************************************"\r
+echo ""\r
+git checkout master\r
+\r
+# push Maven submodule to origin\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Pushing Maven submodule"\r
+echo "************************************************************************"\r
+echo ""\r
+cd maven\r
+git push origin master\r
+cd ..\r
+\r
+# push project branches\r
+echo ""\r
+echo "************************************************************************"\r
+echo "Pushing master and gh-pages"\r
+echo "************************************************************************"\r
+echo ""\r
+git push origin master gh-pages\r
+\r
+# update the Maven submodule reference\r
+git submodule update\r