{"id":718,"date":"2005-10-11T22:29:13","date_gmt":"2005-10-12T02:29:13","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=718"},"modified":"2005-10-11T22:29:13","modified_gmt":"2005-10-12T02:29:13","slug":"subversion-ant-release-scripts","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2005\/10\/11\/subversion-ant-release-scripts\/","title":{"rendered":"Subversion + Ant Release Scripts"},"content":{"rendered":"<p>I&#8217;m not sure where this script fits into <a href=\"http:\/\/www.joelonsoftware.com\/articles\/fog0000000043.html\">&#8216;The Joel Test&#8217;<\/a>, but in the interest of automating the process of releasing a build in <a href=\"http:\/\/subversion.tigris.org\/\">Subversion<\/a>, I had the new guy (hey Pete!) spend his first couple days writing a script that: <\/p>\n<ol>\n<li>copies the trunk to the named branch (ie: \/myproject\/trunk &#8211;&gt; \/branches\/1.10)<\/li>\n<li>copies the &#8216;latest&#8217; tag to a tag called &#8216;rollback&#8217;<\/li>\n<li>copies the newly created branch to \/tags\/latest<\/li>\n<\/ol>\n<p>The end result is that when we decide to do a release to the production environment, we can simply run the script (<a href=\"\/projects\/subversion\/svnrelease.txt\">download the plain text<\/a>) which copies the Subversion trunk (the main line of development for those unfamiliar with Subversion) to a tag we called &#8216;latest&#8217; and also to a branch which matches the version number of the release. We point our production servers to \/$project\/tags\/latest and our development servers (which we setup to run nightly builds) to \/$project\/trunk.<\/p>\n<p>And just so we know that everything is running smoothly, he modified the Ant deployment script so that it sends an email upon completion indicating success or failure along with the output from the build.  The email part I thought was going to be relatively simple (ie: use <a href=\"http:\/\/ant.apache.org\/manual\/CoreTasks\/mail.html\">the mail task<\/a>), but I wasn&#8217;t so sure about the generated output. Turns out that you can use <a href=\"http:\/\/ant.apache.org\/manual\/listeners.html\">MailLogger<\/a> feature to listen for and get the status of build events simply by appending a <code>logger<\/code> flag to the invocation of ant:<br \/>\n<code><br \/>\nant -logger org.apache.tools.ant.listener.MailLogger<br \/>\n<\/code><br \/>\nand then by setting the appropriate properties in your build file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m not sure where this script fits into &#8216;The Joel Test&#8217;, but in the interest of automating the process of releasing a build in Subversion, I had the new guy (hey Pete!) spend his first couple days writing a script that: copies the trunk to the named branch (ie: \/myproject\/trunk &#8211;&gt; \/branches\/1.10) copies the &#8216;latest&#8217; &hellip; <a href=\"https:\/\/cephas.net\/blog\/2005\/10\/11\/subversion-ant-release-scripts\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Subversion + Ant Release Scripts<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,12],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/718"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}