Skip to content

Commit a0bd5ae

Browse files
authored
Merge pull request #6 from jboss-qa/release-scripts
Add release script and distribution configuration
2 parents d67932c + 07fca73 commit a0bd5ae

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: java
2+
os:
3+
- linux
4+
jdk:
5+
- oraclejdk8
6+
7+
script:
8+
- mvn install
9+
- mvn checkstyle:check

pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,32 @@
2323
<artifactId>checkstyle-extension</artifactId>
2424
<version>1.1.0-SNAPSHOT</version>
2525

26+
<url>https://github.com/jboss-qa/checkstyle-extension</url>
27+
<issueManagement>
28+
<url>https://github.com/jboss-qa/checkstyle-extension/issues</url>
29+
<system>GitHub Issues</system>
30+
</issueManagement>
31+
32+
<ciManagement>
33+
<system>Travis CI</system>
34+
<url>https://travis-ci.org/jboss-qa/checkstyle-extension</url>
35+
</ciManagement>
36+
37+
<licenses>
38+
<license>
39+
<name>The Apache Software License, Version 2.0</name>
40+
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
41+
<distribution>repo</distribution>
42+
</license>
43+
</licenses>
44+
45+
<scm>
46+
<url>https://github.com/jboss-qa/checkstyle-extension</url>
47+
<connection>scm:git:git://github.com/jboss-qa/checkstyle-extension.git</connection>
48+
<developerConnection>scm:git:[email protected]:jboss-qa/checkstyle-extension.git</developerConnection>
49+
<tag>HEAD</tag>
50+
</scm>
51+
2652
<properties>
2753
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2854
<maven.compiler.source>1.7</maven.compiler.source>

release.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
# Release script
3+
4+
# Exit whenever a command fails
5+
set -e
6+
7+
if [ $# != 2 ]; then
8+
echo "usage: ./release.sh <releaseVersion> <developmentVersion>"
9+
exit
10+
fi
11+
12+
RELEASE_VERSION=$1
13+
DEVEL_VERSION=$2
14+
TAG=v$RELEASE_VERSION
15+
16+
read -r -p "Release details:
17+
* releaseVersion = $RELEASE_VERSION
18+
* developmentVersion = $DEVEL_VERSION
19+
Are you sure? [y/N]: " response
20+
response=$(echo $response | tr '[:upper:]' '[:lower:]') # tolower
21+
22+
if [[ $response =~ ^(yes|y) ]]; then
23+
git checkout develop
24+
git pull upstream develop
25+
mvn -B release:prepare -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVEL_VERSION
26+
mvn release:perform
27+
git checkout master
28+
git pull upstream master
29+
git rebase $TAG
30+
git push upstream develop master $TAG
31+
git checkout develop
32+
echo "Done!"
33+
else
34+
echo "Canceled!"
35+
fi

0 commit comments

Comments
 (0)