]> source.dussan.org Git - iciql.git/commitdiff
Added release process script template
authorJames Moger <james.moger@gmail.com>
Wed, 10 Apr 2013 13:56:03 +0000 (09:56 -0400)
committerJames Moger <james.moger@gmail.com>
Wed, 10 Apr 2013 14:30:52 +0000 (10:30 -0400)
build.xml
release.template [new file with mode: 0644]

index 18deb99c64f9ce5b630b2553c93b93cfca01325a..0c1a6708c3b0ae0d61f5c6805bb5668cccd5b34c 100644 (file)
--- a/build.xml
+++ b/build.xml
                        </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
diff --git a/release.template b/release.template
new file mode 100644 (file)
index 0000000..7b5460d
--- /dev/null
@@ -0,0 +1,115 @@
+#!/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