Skip to content

Commit 3491216

Browse files
committed
Merge pull request #63 from allegro/development
1.2.2 version from development to master
2 parents d2fb7a9 + dbf59d3 commit 3491216

File tree

9 files changed

+31
-14
lines changed

9 files changed

+31
-14
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: java
22

33
install: ./gradlew assemble
44
script: ./gradlew check
5+
after_success: ./gradlew jacocoTestReport coveralls
56

67
jdk:
7-
- openjdk7
8+
- openjdk7

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ axion-release-plugin
44
*gradle release and version management plugin*
55

66
[![Build Status](https://travis-ci.org/allegro/axion-release-plugin.svg?branch=master)](https://travis-ci.org/allegro/axion-release-plugin)
7+
[![Coverage Status](https://coveralls.io/repos/allegro/axion-release-plugin/badge.svg?branch=development)](https://coveralls.io/r/allegro/axion-release-plugin)
78
[![readthedocs](https://readthedocs.org/projects/axion-release-plugin/badge/?version=latest) ](http://axion-release-plugin.readthedocs.org/en/latest/)
89
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/pl.allegro.tech.build/axion-release-plugin/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/pl.allegro.tech.build/axion-release-plugin)
910
[![JCenter](https://api.bintray.com/packages/allegro/maven/axion-release-plugin/images/download.svg) ](https://bintray.com/allegro/maven/axion-release-plugin/_latestVersion)

build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id 'jacoco'
55
id 'nu.studer.plugindev' version '1.0.3'
66
id 'pl.allegro.tech.build.axion-release' version '1.2.0'
7+
id 'com.github.kt3k.coveralls' version '2.3.1'
78
}
89

910
scmVersion {
@@ -30,8 +31,8 @@ dependencies {
3031
compile gradleApi()
3132
compile localGroovy()
3233

33-
compile group: 'org.ajoberstar', name: 'grgit', version: '0.4.0'
34-
compile group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.8.0'
34+
compile group: 'org.ajoberstar', name: 'grgit', version: '1.1.0'
35+
compile group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.9.0'
3536

3637
testCompile(group: 'org.spockframework', name: 'spock-core', version: '0.7-groovy-2.0') {
3738
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
@@ -45,8 +46,15 @@ test {
4546
}
4647
}
4748

49+
jacocoTestReport {
50+
reports {
51+
xml.enabled = true
52+
html.enabled = true
53+
}
54+
}
55+
4856
task wrapper(type: Wrapper) {
49-
gradleVersion = '2.2'
57+
gradleVersion = '2.3'
5058
}
5159

5260
plugindev {
@@ -76,4 +84,3 @@ bintray {
7684
}
7785
}
7886
}
79-

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Changelog
22
=========
33

4+
* **1.2.2** (21.03.2015)
5+
* use newer GrGit (and JGit) version with some bugfixes
6+
* start using Coveralls
47
* **1.2.1** (08.03.2015)
58
* create separate tasks for tag creation and pushing
69
* possibility to use different configuration across multiple modules

gradle/wrapper/gradle-wrapper.jar

-7 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 01 17:51:29 CET 2014
1+
#Sat Mar 21 09:19:14 CET 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip

src/main/groovy/pl/allegro/tech/build/axion/release/infrastructure/di/ScmRepositoryFactory.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package pl.allegro.tech.build.axion.release.infrastructure.di
22

33
import org.gradle.api.Project
44
import pl.allegro.tech.build.axion.release.domain.RepositoryConfig
5+
import pl.allegro.tech.build.axion.release.domain.scm.ScmIdentity
6+
import pl.allegro.tech.build.axion.release.domain.scm.ScmIdentityResolver
57
import pl.allegro.tech.build.axion.release.domain.scm.ScmInitializationOptions
68
import pl.allegro.tech.build.axion.release.domain.scm.ScmRepository
79
import pl.allegro.tech.build.axion.release.domain.scm.ScmRepositoryUnavailableException
@@ -20,7 +22,8 @@ class ScmRepositoryFactory {
2022
ScmRepository repository
2123
try {
2224
ScmInitializationOptions initializationOptions = ScmInitializationOptions.fromProject(project, config.remote)
23-
repository = new GitRepository(config.directory, initializationOptions)
25+
ScmIdentity identity = ScmIdentityResolver.resolve(config)
26+
repository = new GitRepository(config.directory, identity, initializationOptions)
2427
}
2528
catch(ScmRepositoryUnavailableException exception) {
2629
project.logger.warn("Failed top open repository, trying to work without it", exception)

src/main/groovy/pl/allegro/tech/build/axion/release/infrastructure/git/GitRepository.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ class GitRepository implements ScmRepository {
2626

2727
private final Grgit repository
2828

29-
GitRepository(File repositoryDir, ScmInitializationOptions options) {
29+
GitRepository(File repositoryDir, ScmIdentity identity, ScmInitializationOptions options) {
3030
try {
3131
this.repositoryDir = repositoryDir
32-
repository = Grgit.open(repositoryDir)
32+
repository = Grgit.open(dir: repositoryDir)
3333
}
3434
catch(RepositoryNotFoundException exception) {
3535
throw new ScmRepositoryUnavailableException(exception)
@@ -39,7 +39,7 @@ class GitRepository implements ScmRepository {
3939
this.attachRemote(options.remote, options.remoteUrl)
4040
}
4141
if (options.fetchTags) {
42-
this.fetchTags()
42+
this.fetchTags(identity, options.remote)
4343
}
4444
}
4545

src/test/groovy/pl/allegro/tech/build/axion/release/infrastructure/git/GitRepositoryTest.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class GitRepositoryTest extends Specification {
1818

1919
ScmInitializationOptions initializationOptions
2020

21+
ScmIdentity identity = ScmIdentity.defaultIdentity()
22+
2123
Grgit rawRepository
2224

2325
Grgit remoteRawRepository
@@ -36,7 +38,7 @@ class GitRepositoryTest extends Specification {
3638
rawRepository = Grgit.clone(dir: projectDir, uri: "file://$remoteProjectDir.canonicalPath")
3739

3840
initializationOptions = ScmInitializationOptions.fromProject(project, 'origin')
39-
repository = new GitRepository(projectDir, initializationOptions)
41+
repository = new GitRepository(projectDir, identity, initializationOptions)
4042
}
4143

4244

@@ -45,7 +47,7 @@ class GitRepositoryTest extends Specification {
4547
Project gitlessProject = ProjectBuilder.builder().build()
4648

4749
when:
48-
new GitRepository(gitlessProject.file('./'), initializationOptions)
50+
new GitRepository(gitlessProject.file('./'), identity, initializationOptions)
4951

5052
then:
5153
thrown(ScmRepositoryUnavailableException)
@@ -94,7 +96,7 @@ class GitRepositoryTest extends Specification {
9496
File projectDir = commitlessProject.file('./')
9597

9698
Grgit.init(dir: projectDir)
97-
GitRepository commitlessRepository = new GitRepository(projectDir, initializationOptions)
99+
GitRepository commitlessRepository = new GitRepository(projectDir, identity, initializationOptions)
98100

99101
when:
100102
ScmPosition position = commitlessRepository.currentPosition(~/^release.*/)

0 commit comments

Comments
 (0)