Skip to content

Commit

Permalink
Merge pull request #3 from allegro/development
Browse files Browse the repository at this point in the history
Release 0.9.1
  • Loading branch information
adamdubiel committed Sep 25, 2014
2 parents ddf0dc3 + 074f732 commit 5efb761
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
25 changes: 23 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '0.9.0'
}
}

apply plugin: 'groovy'
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'axion-release'

scmVersion {
tag {
prefix = 'axion-release'
}
}

group = 'pl.allegro.tech.build'
version = '0.9.0'
version = scmVersion.version

repositories {
mavenCentral()
Expand Down Expand Up @@ -38,13 +54,18 @@ task groovydocJar(type: Jar) {
from groovydoc
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives groovydocJar, sourceJar
archives javadocJar, groovydocJar, sourceJar
}

signing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GitRepository implements ScmRepository {
if (options.attachRemote) {
this.attachRemote(options.remote, options.remoteUrl)
}
if(options.fetchTags) {
if (options.fetchTags) {
this.fetchTags()
}
}
Expand Down Expand Up @@ -81,22 +81,28 @@ class GitRepository implements ScmRepository {
}
}

@Override
void commit(String message) {
repository.add(patterns: ['*'])
repository.commit(message: message)
}

@Override
void attachRemote(String remoteName, String remoteUrl) {
Config config = repository.repository.jgit.repository.config

RemoteConfig remote = new RemoteConfig(config, remoteName)
remote.addURI(new URIish(remoteUrl))
// clear other push specs
List<URIish> pushUris = new ArrayList<>(remote.pushURIs)
for (URIish uri : pushUris) {
remote.removePushURI(uri)
}
remote.addPushURI(new URIish(remoteUrl))
remote.update(config)

config.save()
}

@Override
void commit(String message) {
repository.add(patterns: ['*'])
repository.commit(message: message)
}

@Override
ScmPosition currentPosition(String tagPrefix) {
Map tags = repository.tag.list()
Expand Down

0 comments on commit 5efb761

Please sign in to comment.