Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0dc320b178594ef461ff369d2561870175ad738c (plain) (blame)
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
       Copyright (c) 2011 Obeo.
  All rights reserved. This program and the accompanying materials
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
  http://www.eclipse.org/legal/epl-v10.html

  Contributors:
      Obeo - initial API and implementation

 $Id: promoter.xml,v 1.36 2012/03/21 08:40:06 sbouchet Exp $
-->
<project name="Promoter" default="main">
	<!--
        This promotion script helps to automatically promote the last sucessful build of tycho based build to correct location.

	Be sure to use at least ant 1.8.2 to launch this script.

	Ant 1.8.2 is located here : /shared/common/apache-ant-1.8.2/
	on build.eclipse.org, do a
	$> export ANT_HOME=/shared/common/apache-ant-1.8.2/
	-->

	<property name="downloads.project.root" value="/linuxtools" />
	<property name="repo.name" value="${mirror-repo-name}" />
	<property name="build.root" value="${project.build.directory}" />
	<antversion property="antversion" />

	<target name="main">

		<!-- publish p2 repository -->
		<antcall target="-publish.build.repository" inheritall="true" />
	</target>

	<target name="-publish.build.repository">
		<property name="mirror.repository.path" value="${downloads.project.root}/${repo.name}" />

		<!-- adding p2.mirrorsURL and p2.statsURI to the repository -->
		<unzip dest="${build.root}/repository">
			<fileset file="${build.root}/repository/artifacts.jar" />
		</unzip>
                <!-- Delete the archive, it will be re-generated -->
                <delete file="${build.root}/repository/artifacts.jar" />
		<move file="${build.root}/repository/artifacts.xml" tofile="${build.root}/repository/artifacts.original.xml" />
		<xslt style="p2.xsl" in="${build.root}/repository/artifacts.original.xml" out="${build.root}/repository/artifacts.xml">
			<param name="mirrorsURL" expression="http://www.eclipse.org/downloads/download.php?file=${mirror.repository.path}&amp;format=xml" />
		</xslt>
		<zip destfile="${build.root}/repository/artifacts.jar" basedir="${build.root}/repository" includes="artifacts.xml" />
               <delete file="${build.root}/repository/artifacts.xml" />
               <delete file="${build.root}/repository/artifacts.original.xml" />

		<!-- adding p2.index -->
		<echo file="${build.root}/repository/p2.index" message="version = 1${line.separator}metadata.repository.factory.order = content.xml,\!${line.separator}artifact.repository.factory.order = artifacts.xml,\!" />

	</target>

</project>

Back to the top