Skip to content

Commit 6ed99b2

Browse files
author
Vladimir Kotal
committed
create Github releases on tag
fixes #1967 Ref: travis-ci/travis-ci#9483
1 parent 417a89a commit 6ed99b2

File tree

9 files changed

+329
-134
lines changed

9 files changed

+329
-134
lines changed

.travis.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ before_script:
2727
- if `which cvs`; then cvs --version; fi
2828
- if `which mtn`; then mtn --version; fi
2929
- if `which bzr`; then bzr version; fi
30-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd opengrok-indexer && mvn javadoc:javadoc && cd ../opengrok-web && mvn javadoc:javadoc && cd ..; fi
30+
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd opengrok-indexer && mvn javadoc:javadoc && cd ../opengrok-web && mvn javadoc:javadoc && cd ..; fi
3131

3232
env:
3333
global:
@@ -51,3 +51,38 @@ addons:
5151
branch_pattern: "coverity_scan"
5252
# build_command_prepend: "mvn clean"
5353
build_command: "mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V compile"
54+
55+
deploy:
56+
# Pre-release
57+
- provider: releases
58+
script:
59+
- echo "$TRAVIS_TAG"
60+
- echo "$TRAVIS_BRANCH"
61+
- mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
62+
prerelease: true
63+
api_key:
64+
secure: sCPR3INSECAj3VcIr2eKVOfWVs4mJbOe9WLVrnV0zo9ITRsSFxvjOPbtlQVcr3kQSlYfPsw4EqWcZMXe7usGOlBqKPd8eipce0QFo7sZbeOFHwBO5VHvtiaeyeGnDSmxfpjgwHvUkIQ8hc2EAbJ/sx8qtg+bfcLobiiW4xcCzc+j1Tbjv84CO46m7GiV3ZW63yB/q/5MCxqUOwd2A4FnN5vKS03SLklNra1iuTJzi9jhcN0I+Y9rzwLDzkNQnZhC0nlVgks1AMtv/DCK5a3hYrzXU5x3mHZ2r+qMfWaXQ081odQctzs5JciJrtbm18H9esPNKKLiHmn6d8HjXR5g65VPoJZnj/gTrldGSKX+dQPJWAFTrf2R8zcKlBMtkLpJQKNmsoYBbXAyvlxTQshWDOeVRmyNB0HZwPHb3vfnqfXWFYi7f3+3hnV41m111huZ+8EdVcNbPAddlKvzaJ09sXbmNzSKduaF+f+BGfRMmBT+3eyOLQXPY3++nMeJ1BRxL78OWCeqDVi+jxSbdSNIo7bvo2NK3FVWMEanGpEKdJgbR8N+PPL+0VRTziYNtHQ7j1W2QmIs0YRF93f2TrnY4qj9CUMcm+qcLnRtcWtK6gHBxe93ojosn6pTZNTgOWgHyQDXiksevUyIvs80AtVEGNFgkj4WAbFRtWiMeRgTgZQ=
65+
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
66+
skip_cleanup: true
67+
on:
68+
# XXX
69+
repo: vladak/OpenGrok
70+
tags: true
71+
condition: "$TRAVIS_TAG =~ rc[0-9]+$"
72+
# XXX branch: master
73+
# Full release
74+
- provider: releases
75+
script:
76+
- echo "$TRAVIS_TAG"
77+
- echo "$TRAVIS_BRANCH"
78+
- mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
79+
api_key:
80+
secure: sCPR3INSECAj3VcIr2eKVOfWVs4mJbOe9WLVrnV0zo9ITRsSFxvjOPbtlQVcr3kQSlYfPsw4EqWcZMXe7usGOlBqKPd8eipce0QFo7sZbeOFHwBO5VHvtiaeyeGnDSmxfpjgwHvUkIQ8hc2EAbJ/sx8qtg+bfcLobiiW4xcCzc+j1Tbjv84CO46m7GiV3ZW63yB/q/5MCxqUOwd2A4FnN5vKS03SLklNra1iuTJzi9jhcN0I+Y9rzwLDzkNQnZhC0nlVgks1AMtv/DCK5a3hYrzXU5x3mHZ2r+qMfWaXQ081odQctzs5JciJrtbm18H9esPNKKLiHmn6d8HjXR5g65VPoJZnj/gTrldGSKX+dQPJWAFTrf2R8zcKlBMtkLpJQKNmsoYBbXAyvlxTQshWDOeVRmyNB0HZwPHb3vfnqfXWFYi7f3+3hnV41m111huZ+8EdVcNbPAddlKvzaJ09sXbmNzSKduaF+f+BGfRMmBT+3eyOLQXPY3++nMeJ1BRxL78OWCeqDVi+jxSbdSNIo7bvo2NK3FVWMEanGpEKdJgbR8N+PPL+0VRTziYNtHQ7j1W2QmIs0YRF93f2TrnY4qj9CUMcm+qcLnRtcWtK6gHBxe93ojosn6pTZNTgOWgHyQDXiksevUyIvs80AtVEGNFgkj4WAbFRtWiMeRgTgZQ=
81+
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
82+
skip_cleanup: true
83+
on:
84+
# XXX
85+
repo: vladak/OpenGrok
86+
tags: true
87+
condition: "! $TRAVIS_TAG =~ rc[0-9]+$"
88+
# XXX branch: master

distribution/assembly.xml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<assembly>
2+
<id>bin</id>
3+
<formats>
4+
<format>tar.gz</format>
5+
</formats>
6+
<files>
7+
<file>
8+
<source>${project.basedir}/../opengrok-indexer/target/opengrok-${version}.jar</source>
9+
<outputDirectory>lib</outputDirectory>
10+
<destName>opengrok.jar</destName>
11+
</file>
12+
<file>
13+
<source>${project.basedir}/../plugins/target/plugins-${version}.jar</source>
14+
<outputDirectory>share/lib</outputDirectory>
15+
<destName>plugins.jar</destName>
16+
</file>
17+
<file>
18+
<source>${project.build.directory}/dist/opengrok-web-${version}.war</source>
19+
<outputDirectory>lib</outputDirectory>
20+
<destName>source.war</destName>
21+
</file>
22+
</files>
23+
<fileSets>
24+
<fileSet>
25+
<directory>${project.basedir}/..</directory>
26+
<outputDirectory>doc</outputDirectory>
27+
<includes>
28+
<include>README*</include>
29+
<include>LICENSE*</include>
30+
<include>CHANGES*</include>
31+
<include>paths.tsv</include>
32+
<include>logging.properties</include>
33+
</includes>
34+
</fileSet>
35+
<fileSet>
36+
<directory>${project.basedir}/../doc</directory>
37+
<outputDirectory>doc</outputDirectory>
38+
<includes>
39+
<include>README*</include>
40+
<include>authorization_howto.txt</include>
41+
<include>ctags.config</include>
42+
<include>EXAMPLE.txt</include>
43+
<include>groups_howto.txt</include>
44+
</includes>
45+
</fileSet>
46+
<fileSet>
47+
<directory>${project.build.directory}/dist</directory>
48+
<outputDirectory>man/man1</outputDirectory>
49+
<includes>
50+
<include>opengrok.1</include>
51+
</includes>
52+
</fileSet>
53+
<fileSet>
54+
<directory>${project.basedir}/..</directory>
55+
<outputDirectory>bin</outputDirectory>
56+
<includes>
57+
<include>OpenGrok</include>
58+
</includes>
59+
</fileSet>
60+
<fileSet>
61+
<directory>${project.basedir}/../tools</directory>
62+
<outputDirectory>bin</outputDirectory>
63+
<includes>
64+
<include>ConfigMerge</include>
65+
<include>Messages</include>
66+
<include>Groups</include>
67+
</includes>
68+
</fileSet>
69+
<fileSet>
70+
<directory>${project.basedir}/../tools/sync</directory>
71+
<outputDirectory>bin</outputDirectory>
72+
<includes>
73+
<include>*.py</include>
74+
</includes>
75+
</fileSet>
76+
<fileSet>
77+
<directory>${project.build.directory}/../lib</directory>
78+
<outputDirectory>lib/lib</outputDirectory>
79+
<includes>
80+
<include>*.jar</include>
81+
</includes>
82+
</fileSet>
83+
<fileSet>
84+
<directory>${project.build.directory}/dist</directory>
85+
<outputDirectory>lib/lib</outputDirectory>
86+
<includes>
87+
<include>*.jar</include>
88+
</includes>
89+
</fileSet>
90+
</fileSets>
91+
</assembly>

distribution/pom.xml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.opensolaris.opengrok</groupId>
9+
<artifactId>opengrok-top</artifactId>
10+
<version>1.1-rc1006</version>
11+
</parent>
12+
13+
<artifactId>opengrok-dist</artifactId>
14+
15+
<packaging>pom</packaging>
16+
17+
<name>Distribution</name>
18+
19+
<!--
20+
NOTE: These dependency declarations are required to sort this project
21+
to the end of the line in the multimodule build and to get the jar files.
22+
-->
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.opensolaris.opengrok</groupId>
26+
<artifactId>opengrok</artifactId>
27+
<version>1.1-rc1006</version>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.opensolaris.opengrok</groupId>
32+
<artifactId>opengrok-web</artifactId>
33+
<version>1.1-rc1006</version>
34+
<type>war</type>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.codehaus.mojo</groupId>
42+
<artifactId>exec-maven-plugin</artifactId>
43+
<version>1.6.0</version>
44+
<executions>
45+
<execution>
46+
<id>man-page</id>
47+
<phase>package</phase>
48+
<goals>
49+
<goal>exec</goal>
50+
</goals>
51+
</execution>
52+
</executions>
53+
<configuration>
54+
<executable>java</executable>
55+
<outputFile>${project.build.directory}/dist/opengrok.1</outputFile>
56+
<arguments>
57+
<argument>-classpath</argument>
58+
<argument>${project.basedir}/../opengrok-indexer/target/opengrok-${version}.jar</argument>
59+
<argument>org.opensolaris.opengrok.index.Indexer</argument>
60+
<argument>--man</argument>
61+
</arguments>
62+
</configuration>
63+
</plugin>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-dependency-plugin</artifactId>
67+
<version>3.1.0</version>
68+
<executions>
69+
<execution>
70+
<id>copy-dependencies</id>
71+
<phase>package</phase>
72+
<goals>
73+
<goal>copy-dependencies</goal>
74+
</goals>
75+
<configuration>
76+
<outputDirectory>${project.build.directory}/dist</outputDirectory>
77+
<overWriteReleases>false</overWriteReleases>
78+
<overWriteSnapshots>false</overWriteSnapshots>
79+
<overWriteIfNewer>true</overWriteIfNewer>
80+
</configuration>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-assembly-plugin</artifactId>
86+
<version>3.1.0</version>
87+
<configuration>
88+
<finalName>opengrok-${version}</finalName>
89+
<appendAssemblyId>false</appendAssemblyId>
90+
<descriptors>
91+
<descriptor>assembly.xml</descriptor>
92+
</descriptors>
93+
</configuration>
94+
<executions>
95+
<execution>
96+
<id>create-archive</id>
97+
<phase>package</phase>
98+
<goals>
99+
<goal>single</goal>
100+
</goals>
101+
</execution>
102+
</executions>
103+
</plugin>
104+
</plugins>
105+
</build>
106+
107+
</project>

doc/release.txt

Lines changed: 16 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Release criteria
22
----------------
33

4-
Ideally, the following minimum criteria should be fulfilled before a new version
5-
is released:
4+
Ideally, the following minimum criteria should be fulfilled before a new
5+
version is released:
66

77
- The code coverage for blocks must be at least 80%
88
- No findbugs warnings
@@ -13,24 +13,18 @@ is released:
1313
Checklist for releasing OpenGrok:
1414
---------------------------------
1515

16-
../ext_lib - is a directory where we keep latest JFlex.jar and all necessary
17-
jars/dirs for tests
16+
0) set new version
1817

19-
0) set proper version in build.xml
20-
21-
<property name="version" value="???"/>
22-
23-
and put some stuff into CHANGES.txt
18+
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=1.1-rcXYZ
2419

2520
Then commit and push the change:
2621

27-
git commit build.xml
22+
git commit --all
2823
git push
2924

3025
1) build must be clean
3126

32-
ant clean
33-
ant # defaults to jar currently
27+
mvn clean package
3428

3529
2) sanity check:
3630

@@ -48,64 +42,22 @@ jars/dirs for tests
4842
3) check all tests, tests code coverage:
4943
junit, pmd, findbugs, checkstyle, emma, jdepend
5044

51-
They should be ok, currently only checkstyle has 8 warnings, the rest is
52-
clean; emma reports should be based according to what is set for the release,
53-
usually it's overall coverage above 80%)
54-
55-
(jenkins can help here, see README.txt on setup)
56-
57-
The release is OK, once above is fulfilled to our satisfaction.
58-
59-
4) produce proper distributions
60-
61-
Check them before upload, always try to build on Solaris, since GNU tar might
62-
create a non-standard compliant .tgz version and tag from step 0) will be used
63-
to produce the archive
64-
65-
ant dist
66-
ant package
67-
68-
The command above creates both formats of package .pkg and .p5p into the directory dist
69-
45+
emma reports should be based according to what is set for the release,
46+
usually it's overall coverage above 80%.
7047

71-
Note that for the IPS package *.p5p the version names are translated this way:
48+
Jenkins can help here.
7249

73-
0.12 ~ 0.12.0.1.0
74-
0.<n> ~ 0.<n>.0.1.0
75-
...
50+
The release is OK, once above is fulfilled to our satisfaction.
7651

77-
0.12-rc1 ~ 0.12.0.0.1
78-
0.12-rc<i> ~ 0.12.0.0.<i>
79-
...
52+
4) Trigger release creation
8053

81-
(Note that the release candidate must follow immediately after the basic version
82-
number (0.12))
54+
git tag 1.1-rcXYZ
55+
git push origin tag 1.1-rcXYZ
8356

57+
Wait for the build to finish and release created.
8458

85-
0.12.1 ~ 0.12.1.0.0
86-
0.12.<j> ~ 0.12.<j>.0.0
87-
...
88-
89-
0.12.0.1 ~ 0.12.0.1.1
90-
0.12.0.<k> ~ 0.12.0.1.<k>
91-
...
92-
93-
5) Create the release and upload the files via GitHub API:
94-
95-
First, make sure these environment variables are set:
96-
97-
GITHUB_USER (your Github user name)
98-
GITHUB_PASSWORD (your Github password)
99-
https_proxy (set to host:port of proxy if behind HTTP proxy)
100-
DO_PRERELEASE (set to non-empty if creating release candidate)
101-
102-
Next:
103-
104-
ant release
105-
106-
Now go to https://github.com/OpenGrok/OpenGrok/releases and edit the text
59+
Go to https://github.com/OpenGrok/OpenGrok/releases and edit the text
10760
of the release, e.g. adding list of issues fixed, whether complete reindex
10861
is necessary etc.
10962

110-
5) Send announcement to [email protected]
111-
63+
5) Send announcement to [email protected], Slack channel etc.

jrcs/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<groupId>org.opensolaris.opengrok</groupId>
66
<artifactId>jrcs</artifactId>
77
<packaging>jar</packaging>
8-
<version>1.1-SNAPSHOT</version>
8+
<version>1.1-rc1006</version>
99
<name>Java RCS</name>
1010

1111
<parent>
1212
<groupId>org.opensolaris.opengrok</groupId>
13-
<artifactId>opengrok</artifactId>
14-
<version>1.1-SNAPSHOT</version>
13+
<artifactId>opengrok-top</artifactId>
14+
<version>1.1-rc1006</version>
1515
</parent>
1616

1717
<dependencies>

0 commit comments

Comments
 (0)