Skip to content

Commit e25a94b

Browse files
committed
Issue #279: deploy to github pages instead of bintray
1 parent b04c281 commit e25a94b

File tree

14 files changed

+279
-120
lines changed

14 files changed

+279
-120
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ net.sf.eclipsecs.core/lib/metadata-gen-1.0-SNAPSHOT.jar
99
target/
1010
show.patch
1111
*.DS_Store
12+
net.sf.eclipsecs-updatesite/workspace

docs/update/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/update/compositeArtifacts.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/update/compositeContent.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/update/p2.index

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0"?>
2+
<project name="project">
3+
<target name="compute.child.repository.data">
4+
<property name="full.version" value="${unqualifiedVersion}.${buildQualifier}" />
5+
6+
<property name="updates.suffix" value=".x"/>
7+
<property name="main.site.composite.name" value="${site.label} All Versions" />
8+
<property name="child1.site.composite.name"
9+
value="${site.label} ${parsedVersion.majorVersion}${updates.suffix}" />
10+
<property name="child2.site.composite.name"
11+
value="${site.label} ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}${updates.suffix}" />
12+
13+
<property name="composite.base.dir" value="target"/>
14+
<property name="updates.path" value="updates"/>
15+
<property name="releases.path.prefix" value="../../../releases"/>
16+
17+
<property name="main.site.composite.directory"
18+
location="${composite.base.dir}" />
19+
<property name="child1.site.composite.path"
20+
value="${updates.path}/${parsedVersion.majorVersion}${updates.suffix}" />
21+
<property name="child1.site.composite.directory"
22+
location="${composite.base.dir}/${child1.site.composite.path}" />
23+
<property name="child2.site.composite.path"
24+
value="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}${updates.suffix}" />
25+
<property name="child2.site.composite.directory"
26+
location="${composite.base.dir}/${child1.site.composite.path}/${child2.site.composite.path}" />
27+
28+
<property name="release.repository"
29+
value="${releases.path.prefix}/${full.version}" />
30+
</target>
31+
32+
<target name="p2.composite.add" depends="compute.child.repository.data">
33+
<add.composite.repository.internal
34+
composite.repository.location="${main.site.composite.directory}"
35+
composite.repository.name="${main.site.composite.name}"
36+
composite.repository.child="${child1.site.composite.path}" />
37+
<add.composite.repository.internal
38+
composite.repository.location="${child1.site.composite.directory}"
39+
composite.repository.name="${child1.site.composite.name}"
40+
composite.repository.child="${child2.site.composite.path}" />
41+
<add.composite.repository.internal
42+
composite.repository.location="${child2.site.composite.directory}"
43+
composite.repository.name="${child2.site.composite.name}"
44+
composite.repository.child="${release.repository}" />
45+
</target>
46+
47+
<target name="p2.composite.add.external" depends="compute.child.repository.data">
48+
<add.external.repository.internal
49+
composite.repository.location="${child2.site.composite.directory}"
50+
composite.repository.name="${child2.site.composite.name}"
51+
composite.repository.child="${child.repo}" />
52+
</target>
53+
54+
<!-- = = = = = = = = = = = = = = = = =
55+
macrodef: add.composite.repository.internal
56+
= = = = = = = = = = = = = = = = = -->
57+
<macrodef name="add.composite.repository.internal">
58+
<attribute name="composite.repository.location" />
59+
<attribute name="composite.repository.name" />
60+
<attribute name="composite.repository.child" />
61+
<sequential>
62+
63+
<echo message=" " />
64+
<echo message="Composite repository : @{composite.repository.location}" />
65+
<echo message="Composite name : @{composite.repository.name}" />
66+
<echo message="Adding child repository : @{composite.repository.child}" />
67+
68+
<p2.composite.repository>
69+
<repository
70+
compressed="false"
71+
location="@{composite.repository.location}"
72+
name="@{composite.repository.name}"
73+
atomic="false" />
74+
<add>
75+
<repository location="@{composite.repository.child}" />
76+
</add>
77+
</p2.composite.repository>
78+
79+
<echo file="@{composite.repository.location}/p2.index">version=1
80+
metadata.repository.factory.order=compositeContent.xml,\!
81+
artifact.repository.factory.order=compositeArtifacts.xml,\!
82+
</echo>
83+
84+
</sequential>
85+
</macrodef>
86+
87+
<!-- = = = = = = = = = = = = = = = = =
88+
macrodef: add.external.repository.internal
89+
= = = = = = = = = = = = = = = = = -->
90+
<macrodef name="add.external.repository.internal">
91+
<attribute name="composite.repository.location" />
92+
<attribute name="composite.repository.name" />
93+
<attribute name="composite.repository.child" />
94+
<sequential>
95+
96+
<echo message=" " />
97+
<echo message="Composite repository : @{composite.repository.location}" />
98+
<echo message="Composite name : @{composite.repository.name}" />
99+
<echo message="Adding child repository : @{composite.repository.child}" />
100+
101+
<p2.composite.repository>
102+
<repository
103+
compressed="false"
104+
location="@{composite.repository.location}"
105+
name="@{composite.repository.name}"
106+
atomic="false" />
107+
<add>
108+
<repository location="@{composite.repository.child}" />
109+
</add>
110+
</p2.composite.repository>
111+
112+
</sequential>
113+
</macrodef>
114+
</project>

net.sf.eclipsecs-updatesite/pom.xml

Lines changed: 162 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<parent>
45
<artifactId>net.sf.eclipsecs.parent</artifactId>
@@ -10,52 +11,185 @@
1011
<packaging>eclipse-repository</packaging>
1112
<name>eclipse-cs Update Site</name>
1213

14+
<properties>
15+
<github-update-repo>[email protected]:Calixte/eclipse-cs-update-site.git</github-update-repo>
16+
<github-local-clone>${project.build.directory}/checkout</github-local-clone>
17+
<releases-directory>${github-local-clone}/releases</releases-directory>
18+
<current-release-directory>${releases-directory}/${qualifiedVersion}</current-release-directory>
19+
<site.label>Eclipse Checkstyle Plugin Update Site</site.label>
20+
</properties>
21+
1322
<profiles>
1423
<profile>
15-
<id>bintray</id>
24+
<id>release-composite</id>
1625
<build>
1726
<plugins>
18-
<!-- Enable alternative deployer. -->
1927
<plugin>
20-
<groupId>com.carrotgarden.maven</groupId>
21-
<artifactId>bintray-maven-plugin</artifactId>
28+
<groupId>org.codehaus.mojo</groupId>
29+
<artifactId>build-helper-maven-plugin</artifactId>
30+
<executions>
31+
<execution>
32+
<id>parse-version</id>
33+
<goals>
34+
<goal>parse-version</goal>
35+
</goals>
36+
</execution>
37+
</executions>
38+
</plugin>
39+
<plugin>
40+
<groupId>org.codehaus.mojo</groupId>
41+
<artifactId>exec-maven-plugin</artifactId>
2242
<configuration>
23-
<skip>false</skip>
24-
<subject>eclipse-cs</subject>
25-
<repository>eclipse-cs</repository>
26-
<!-- Put Bintray credentials in settings.xml. -->
27-
<serverId>bintray</serverId>
43+
<executable>git</executable>
2844
</configuration>
2945
<executions>
3046
<execution>
31-
<id>upload-update-site</id>
32-
<phase>deploy</phase>
47+
<id>git-clone</id>
48+
<phase>prepare-package</phase>
49+
<goals>
50+
<goal>exec</goal>
51+
</goals>
52+
<configuration>
53+
<arguments>
54+
<argument>clone</argument>
55+
<argument>--depth=1</argument>
56+
<argument>-b</argument>
57+
<argument>main</argument>
58+
<argument>${github-update-repo}</argument>
59+
<argument>${github-local-clone}</argument>
60+
</arguments>
61+
</configuration>
62+
</execution>
63+
<execution>
64+
<id>git-add</id>
65+
<phase>verify</phase>
66+
<goals>
67+
<goal>exec</goal>
68+
</goals>
69+
<configuration>
70+
<arguments>
71+
<argument>-C</argument>
72+
<argument>${github-local-clone}</argument>
73+
<argument>add</argument>
74+
<argument>-A</argument>
75+
</arguments>
76+
</configuration>
77+
</execution>
78+
<execution>
79+
<id>git-commit</id>
80+
<phase>verify</phase>
3381
<goals>
34-
<goal>upload</goal>
82+
<goal>exec</goal>
3583
</goals>
3684
<configuration>
37-
<bintrayPackage>update-site</bintrayPackage>
38-
<bintrayVersion>${unqualifiedVersion}</bintrayVersion>
39-
<sourceFolder>${project.build.directory}/repository/</sourceFolder>
40-
<targetFolder>${unqualifiedVersion}</targetFolder>
41-
<performCleanup>true</performCleanup>
42-
<cleanupRegex>^\Q${unqualifiedVersion}\E.*$</cleanupRegex>
85+
<arguments>
86+
<argument>-C</argument>
87+
<argument>${github-local-clone}</argument>
88+
<argument>commit</argument>
89+
<argument>-m</argument>
90+
<argument>Release ${qualifiedVersion}</argument>
91+
</arguments>
4392
</configuration>
4493
</execution>
4594
<execution>
46-
<id>upload-update-site-archive</id>
95+
<id>git-push</id>
4796
<phase>deploy</phase>
4897
<goals>
49-
<goal>upload</goal>
98+
<goal>exec</goal>
99+
</goals>
100+
<configuration>
101+
<arguments>
102+
<argument>-C</argument>
103+
<argument>${github-local-clone}</argument>
104+
<argument>push</argument>
105+
<argument>origin</argument>
106+
<argument>main</argument>
107+
</arguments>
108+
</configuration>
109+
</execution>
110+
</executions>
111+
</plugin>
112+
<plugin>
113+
<artifactId>maven-resources-plugin</artifactId>
114+
<executions>
115+
<execution>
116+
<id>copy-repository</id>
117+
<phase>package</phase>
118+
<goals>
119+
<goal>copy-resources</goal>
120+
</goals>
121+
<configuration>
122+
<outputDirectory>${current-release-directory}</outputDirectory>
123+
<resources>
124+
<resource>
125+
<directory>${project.build.directory}/repository</directory>
126+
</resource>
127+
</resources>
128+
</configuration>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
<plugin>
133+
<groupId>org.eclipse.tycho.extras</groupId>
134+
<artifactId>tycho-eclipserun-plugin</artifactId>
135+
<version>${tycho-version}</version>
136+
<configuration>
137+
<repositories>
138+
<repository>
139+
<id>juno</id>
140+
<layout>p2</layout>
141+
<url>https://download.eclipse.org/releases/juno</url>
142+
</repository>
143+
</repositories>
144+
<dependencies>
145+
<dependency>
146+
<artifactId>org.eclipse.ant.core</artifactId>
147+
<type>eclipse-plugin</type>
148+
</dependency>
149+
<dependency>
150+
<artifactId>org.apache.ant</artifactId>
151+
<type>eclipse-plugin</type>
152+
</dependency>
153+
<dependency>
154+
<artifactId>org.eclipse.equinox.p2.repository.tools</artifactId>
155+
<type>eclipse-plugin</type>
156+
</dependency>
157+
<dependency>
158+
<artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
159+
<type>eclipse-feature</type>
160+
</dependency>
161+
<dependency>
162+
<artifactId>org.eclipse.equinox.p2.extras.feature</artifactId>
163+
<type>eclipse-feature</type>
164+
</dependency>
165+
<dependency>
166+
<artifactId>org.eclipse.equinox.ds</artifactId>
167+
<type>eclipse-plugin</type>
168+
</dependency>
169+
</dependencies>
170+
</configuration>
171+
<executions>
172+
<!-- add our new child repository -->
173+
<execution>
174+
<id>add-p2-composite-repository</id>
175+
<phase>package</phase>
176+
<goals>
177+
<goal>eclipse-run</goal>
50178
</goals>
51179
<configuration>
52-
<bintrayPackage>update-site-archive</bintrayPackage>
53-
<bintrayVersion>${unqualifiedVersion}</bintrayVersion>
54-
<sourceFolder>${project.build.directory}/</sourceFolder>
55-
<uploadRegex>.*\Qnet.sf.eclipsecs-updatesite_\E.*\.zip</uploadRegex>
56-
<targetFolder>update-site-archive</targetFolder>
57-
<performCleanup>true</performCleanup>
58-
<cleanupRegex>^.*\Qnet.sf.eclipsecs-updatesite_${unqualifiedVersion}\E.*\.zip$</cleanupRegex>
180+
<applicationsArgs>
181+
<args>-application</args>
182+
<args>org.eclipse.ant.core.antRunner</args>
183+
<args>-buildfile</args>
184+
<args>packaging-p2composite.ant</args>
185+
<args>p2.composite.add</args>
186+
<args>-Dsite.label="${site.label}"</args>
187+
<args>-Dcomposite.base.dir=${github-local-clone}</args>
188+
<args>-DunqualifiedVersion=${unqualifiedVersion}</args>
189+
<args>-DbuildQualifier=${buildQualifier}</args>
190+
<args>-DparsedVersion.majorVersion=${parsedVersion.majorVersion}</args>
191+
<args>-DparsedVersion.minorVersion=${parsedVersion.minorVersion}</args>
192+
</applicationsArgs>
59193
</configuration>
60194
</execution>
61195
</executions>

net.sf.eclipsecs.doc/src/main/resources/update/.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

net.sf.eclipsecs.doc/src/main/resources/update/compositeArtifacts.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)