forked from viciproject/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteamcity.build
63 lines (51 loc) · 1.47 KB
/
teamcity.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<project>
<target name="updateVersion">
<loadfile
file="${VersionInfoFile}"
property="VersionInfo"
/>
<regex input="${VersionInfo}"
pattern="AssemblyVersion(Attribute)?\D+(?'RootVersion'(\d+\.){2}\d+)"
/>
<property
name="FileVersion"
value="${RootVersion}.${build.number}"
/>
<echo message="##teamcity[buildNumber '${FileVersion}']" />
<asminfo output="${VersionInfoFile}" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
</imports>
<attributes>
<attribute type="AssemblyVersionAttribute" value="${FileVersion}" />
<attribute type="AssemblyFileVersionAttribute" value="${FileVersion}" />
</attributes>
</asminfo>
</target>
<target name="package">
<mkdir dir="_zip" />
<zip zipfile="_zip/${Product}.${build.number}.bin.zip">
<fileset basedir="_build">
<include name="*.dll" />
</fileset>
</zip>
<zip zipfile="_zip/${Product}.${build.number}.src.zip">
<fileset>
<include name="**/*" />
<exclude name="_*/**" />
<exclude name="*.build" />
<exclude name="*.nuspec" />
<exclude name="*.tmp" />
<exclude name="*.gitignore" />
</fileset>
</zip>
</target>
<target name="publishToSite">
<copy todir="${PublishPath}" flatten="true">
<fileset basedir="_zip">
<include name="*.zip"/>
</fileset>
</copy>
</target>
</project>