PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/asl/asl-release.xml

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
XML | 90 lines | 36 code | 12 blank | 42 comment | 0 complexity | d89d60116636cad58cdf8c8562d0f20a MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?> 
 2<!--
 3********************************************************************************
 4* Ant Script Library - release module
 5* Module to create a release
 6* Module property prefix: "release"
 7********************************************************************************
 8* Copyright 2009 Joe Schmetzer
 9*
10* Licensed under the Apache License, Version 2.0 (the "License");
11* you may not use this file except in compliance with the License.
12* You may obtain a copy of the License at
13*
14*     http://www.apache.org/licenses/LICENSE-2.0
15*
16* Unless required by applicable law or agreed to in writing, software
17* distributed under the License is distributed on an "AS IS" BASIS,
18* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19* See the License for the specific language governing permissions and
20* limitations under the License.
21********************************************************************************
22 -->
23<project name="asl-release">
24    <dirname property="asl-release.basedir" file="${ant.file.asl-release}"/>
25    <import file="${asl-release.basedir}/asl-common.xml"/>
26    
27    <!-- ***********************************************************************
28    * target: release
29    ************************************************************************ -->
30    <target name="release"
31    	    depends="release-tag, release-export, release-compile, release-package"
32            description="Creates a new release version, tagging, checkout, build and package"/>
33
34    <!-- ***********************************************************************
35    * target: release-version
36    ************************************************************************ -->
37    <target name="-release-init-properties" depends="-init-time, -init-version">
38    	<echo message="Release version is ${release.version}"/>
39    	
40        <property name="release.tag" value="${ant.project.name}-${release.version}"/>
41        <echo message="Release tag is ${release.tag}"/>
42    
43        <property name="release.workspace" location="${common.target-dir}/release/${release.version}"/>
44        <property name="release.buildfile-name" value="build.xml"/>
45        <property name="release.buildfile-path" location="${release.workspace}/${release.buildfile-name}"/>
46    </target>
47
48    <!-- ***********************************************************************
49    * target: release-tag
50    ************************************************************************ -->
51    <target name="release-tag" depends="-release-init-properties,-release-check-dir"
52            description="Tags the code in scm using the release version">
53    	
54        <echo message="Tagging '${release.server-path}' with tag '${release.tag}'"/>
55        <scm-tag dir="${release.server-path}" tag="${release.tag}"/>
56    	
57    </target>
58
59    <!-- ***********************************************************************
60    * target: -release-check-dir
61    ************************************************************************ -->
62    <target name="-release-check-dir" unless="release.server-path">
63    	<fail message="The property 'release.server-path' must be defined"/>
64    </target>
65	
66    <!-- ***********************************************************************
67    * target: release-export
68    ************************************************************************ -->
69    <target name="release-export" depends="-release-init-properties"
70            description="Checks out the code for the specified release tag">
71        
72        <mkdir dir="${release.workspace}"/>
73        <scm-export serverpath="${release.server-path}" version="${release.tag}" localpath="${release.workspace}"/>
74    </target>
75
76    <!-- ***********************************************************************
77    * target: release-build
78    ************************************************************************ -->
79    <target name="release-compile" depends="-release-init-properties"
80            description="Compiles the release">
81        <ant antfile="${release.buildfile-path}" inheritall="false"/>
82    </target>
83
84    <!-- ***********************************************************************
85    * target: release-package
86    ************************************************************************ -->
87    <target name="release-package" depends="-release-init-properties"
88            description="Packages the release">
89    </target>
90</project>