Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 27d690e

Browse files
authored
Merge pull request #4 from scalecube/develop
Prepare new release
2 parents cc16e75 + aca74f2 commit 27d690e

File tree

6 files changed

+55
-34
lines changed

6 files changed

+55
-34
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ addons:
33
packages:
44
- libxml-xpath-perl
55
sudo: required
6-
76
language: java
87
jdk: openjdk8
98
before_install:
@@ -12,11 +11,12 @@ before_install:
1211
after_success: "./src/main/scripts/ci/after-success.sh"
1312
deploy:
1413
- provider: script
15-
script: mvn -P release deploy -DskipTests=true -B -V -s travis-settings.xml
14+
script:
15+
- "./src/main/scripts/cd/deploy.sh"
1616
on:
1717
branch: develop
1818
- provider: script
1919
script:
20-
- "./src/main/scripts/cd/deploy.sh"
20+
- "./src/main/scripts/cd/release.sh"
2121
on:
22-
branch: master
22+
branch: master

src/main/scripts/cd/deploy.sh

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
#!/bin/sh
22

3+
echo Running $0
4+
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
35

4-
commit_to_develop() {
5-
git fetch
6-
git branch -r
7-
git checkout -B develop
8-
git rebase master
9-
git commit --amend -m "++++ Prepare for next development iteration build: $TRAVIS_BUILD_NUMBER ++++"
10-
git push origin develop && curl -u "$GITHUBUSER:$GITHUBTOKEN" -d '{"title": "Prepare new release","head": "develop","base": "master"}' https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls?access_token=$GITTOKEN
11-
12-
}
13-
14-
mvn -P release release:prepare release:perform -DautoVersionSubmodules=true -DscmCommentPrefix="$TRAVIS_COMMIT_MESSAGE [skip ci] " -DskipTests=true -B -V -s travis-settings.xml
15-
16-
17-
mvn clean
18-
commit_to_develop
6+
mvn -P release deploy -DskipTests=true -B -V -s travis-settings.xml

src/main/scripts/cd/release.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
4+
echo Running $0
5+
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
6+
7+
commit_to_develop() {
8+
git fetch
9+
git branch -r
10+
git checkout -B develop
11+
git rebase master
12+
git commit --amend -m "++++ Prepare for next development iteration build: $TRAVIS_BUILD_NUMBER ++++"
13+
git push origin develop
14+
}
15+
16+
mvn -P release release:prepare release:perform -DautoVersionSubmodules=true -DscmCommentPrefix="$TRAVIS_COMMIT_MESSAGE [skip ci] " -DskipTests=true -B -V -s travis-settings.xml
17+
18+
mvn clean
19+
commit_to_develop

src/main/scripts/ci/after-success.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#!/bin/bash
22

3+
4+
echo Running $0
5+
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
6+
37
if [ -z "$CODACY_PROJECT_TOKEN" ]; then
4-
echo [WARNING] Please go to https://app.codacy.com/app/$TRAVIS_REPO_SLUG/settings/coverage and add CODACY_PROJECT_TOKEN to travis settings
8+
echo [WARNING] Please go to https://app.codacy.com/app/$TRAVIS_REPO_SLUG/settings/coverage and add CODACY_PROJECT_TOKEN to travis settings
59
else
6-
find -name jacoco.xml -exec java -jar ~/codacy-coverage-reporter-assembly.jar report -l Java -r {} \;
7-
java -jar ~/codacy-coverage-reporter-assembly.jar final
8-
fi;
10+
find -name jacoco.xml | xargs -i java -jar ~/codacy-coverage-reporter-assembly.jar report -l Java --partial -r {}
11+
java -jar ~/codacy-coverage-reporter-assembly.jar final
12+
fi;

src/main/scripts/ci/before-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
22

3+
4+
echo Running $0
5+
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*
6+
37
# get latest version of codacy reporter from sonatype
48
latest=$(curl "https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/maven-metadata.xml" | xpath -e "/metadata/versioning/release/text()")
59

travis-settings.xml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<settings
33
xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
4-
xmlns='http://maven.apache.org/SETTINGS/1.0.0'
5-
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
4+
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
65
<profiles>
6+
<profile>
7+
<id>skipstyle</id>
8+
<properties>
9+
<checkstyle.skip>true</checkstyle.skip>
10+
</properties>
11+
</profile>
12+
<profile>
13+
<id>skippmd</id>
14+
<properties>
15+
<pmd.skip>true</pmd.skip>
16+
</properties>
17+
</profile>
718
<profile>
819
<id>bintray</id>
920
<repositories>
@@ -19,25 +30,20 @@
1930
</profile>
2031
<profile>
2132
<id>ossrh</id>
22-
<activation>
23-
<activeByDefault>true</activeByDefault>
24-
</activation>
2533
<properties>
26-
<!-- <gpg.executable>gpg</gpg.executable> -->
27-
<!-- <gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname> -->
2834
<gpg.passphrase>${env.GPG_KEY}</gpg.passphrase>
2935
</properties>
3036
</profile>
3137
</profiles>
32-
<activeProfiles>
33-
<activeProfile>bintray</activeProfile>
34-
</activeProfiles>
35-
3638
<servers>
3739
<server>
3840
<id>ossrh</id>
3941
<username>${env.SONATYPE_USERNAME}</username>
4042
<password>${env.SONATYPE_PASSWORD}</password>
4143
</server>
4244
</servers>
45+
<activeProfiles>
46+
<activeProfile>bintray</activeProfile>
47+
<activeProfile>ossrh</activeProfile>
48+
</activeProfiles>
4349
</settings>

0 commit comments

Comments
 (0)