Giter VIP home page Giter VIP logo

gradle-release-plugin's People

Contributors

ari avatar boxheed avatar dcoraboeuf avatar maiflai avatar solidjb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-release-plugin's Issues

releaseTagPattern in SCMService does not match the tag pattern used in ReleasePlugin

The pattern to determine the next tag version inSCMService is

private final def releaseTagPattern = ~/^(\S+)-REL-(\d+)$/

However the code in ReleasePlugin uses a slightly different pattern:

getSCMService().performTagging(getSCMService().getBranchName() + "-RELEASE-" + project.version, msg)

These two patterns should match. It would also be cool if that prefix could be configurable, with options like:

useSourceBranchInTag (would determine if you would put 'trunk-' at the beginning of the tag)
tagTextPrefix (would give you a place to put text that you would want pre-pended to the version number in the tag name e.g. RELEASE-)
tagTextSuffix (would give you a place to put text that you would want appended to the version number in the tag name e.g. -RELEASE)

These are just ideas, I can try and implement them if they sound ok to you.

A DryRun falsely claims there are source code modifications.

After cloning my repo, running build, test, install cleanly on my Java project, I then execute the release task (configured for dry run to see what it looks like). Gradle fails reporting that the release plugin thinks there are source code modifications. If there are, it is news to git! :-)

Working copy format is too old '29'

Hi,

I'm using a SVN client v1.7.10 (r1485443) on MacOS, against a server which is probably 1.6.x.

In my Gradle file, I get:

buildscript {
        repositories {
                mavenCentral()
        }
        dependencies {
                classpath 'au.com.ish.gradle:release:2.2.2'
                classpath 'org.tmatesoft.svnkit:svnkit:1.8.3'
        }
}
apply plugin: 'release'
release {
        scm = 'svn'
}

When I run gradlew release, I get the following error message:

svn: E155036: Working copy format of '...' is too old '29'

I was wondering what version of SVN did you support? Upgrading to a SVN 1.8 client is not possible yet because of the IDE we are using.

Thanks,
Damien.

Release plugin version 2.2.2 depends on sqljet 1.1.8-SNAPSHOT

Hi there,

First I would like to say that this plugin is simple to use! thanks for that and for the plugin at first place.
I am building a gradle wrapper plugin that uses release plugin and I noticed that it tries to fetch sqljet 1.1.8-SNAPSHOT I think this should be using a released version of that lib and not its SNAPSHOT one.

value of scm = 'null' is invalid, even if scm = git is specified

So, my sample build.gradle looks as below:

apply plugin: 'rpm'
apply plugin: 'eclipse'
apply plugin: 'release'

buildscript {
repositories {
mavenCentral()
}

dependencies {
    classpath 'com.trigonic:gradle-rpm-plugin:1.1'
    classpath 'au.com.ish.gradle:release:2.0'
}

}

subprojects {

release {
failOnSnapshotDependencies = true
allowLocalModifications = false
releaseDryRun = false
scm = 'git'
username = 'fred'
password = 'secret01'
}

version = release.projectVersion

}

task rpm(type: Rpm) {
//Pack rpm
}

When I do try to do a gradle release, I get the following error though:

"
$ gradle release
:release FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':release'.

    Your value of scm = 'null' is invalid. Possible options are 'git' or 'svn'

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
"

Release Failing when sub-module depends on other sub-module

Our project structure is simple...

root
--gradle.properties
--settings.gradle
--sub-module-1
----gradle.properties
--sub-module-2
----gradle.properties
--sub-module-3
----gradle.properties

The problem I am experiencing is that the build.gradle of sub-module 2 depends on sub-module-1 like this:

dependencies {
    compile project(':sub-module-1')
}

When I run gradle clean release uploadArchives

I get this error:

:release FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':release'.
> Project contains SNAPSHOT dependencies: [my.group.id:sub-module-1:trunk-SNAPSHOT]

I want the build to fail if I have non-sub-module snapshot dependencies, so turning off failOnSnapshotDependencies is not really an option. I hope I am just missing something...

Here is how the release plugin is configured:

release {
        failOnSnapshotDependencies = true
        scm = 'svn'
    }

and here is what my settings.gradle looks like:

rootProject.name = 'my-project'
include ':sub-module-2',
        ':sub-module-1',
        ':sub-module-3'

unable to release because of local modifications

When I try to release under Windows 7x64 with following configuration:

release {
failOnSnapshotDependencies = true
allowLocalModifications = false
releaseDryRun = false
scm = 'git'
username = gitUser
password = gitPassword
}

I receive allways:

"Uncommited changes found in the source tree"

Of course, there are no changes :)

Is the logic hier:

def boolean hasLocalModifications() {
    gitExec(['status', '--porcelain']) != ""
}

correct?

Failed to get tag name on git

The plugin fails if a tag is checked out from git:

16:44:21.741 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command 'git''. Working directory: (...) Command: git symbolic-ref -q HEAD
16:44:21.768 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
16:44:21.768 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'git'' finished with exit value 1 (state: FAILED)

Is this supposed to work?

SVN Credentials are not taken from the cached local ones and are also not asked for

$ gradle release
Release version would be trunk-SNAPSHOT
:release
Tag! you are it! Release plugin will create a new branch trunk for project LIS-dropwizard-gradle
:release FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':release'.

    org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for 'http://codebase.company.de'

I've confirmed that the credentials are cached locally.
However, it neither takes the cached ones nor asks me for credentials - as the documentation says

Transitive Dependency on a SNAPSHOT

The binary for 2.2.2 that was released to Bintray has a dependency on sqljet-1.1.8-SNAPSHOT which is not available through either Bintray or Maven Central. It's a pain to have to exclude the dependency and manually specify the dependency to sqljet-1.1.8. If anyone comes across this being unsure what to do about it, here is the workaround:

buildscript {
    dependencies {
        classpath 'org.tmatesoft.sqljet:sqljet:1.1.8'
        classpath('au.com.ish.gradle:release:2.2.2') {
            exclude group: 'org.tmatesoft.sqljet', module: 'sqljet'
        }
    }
}

SVN setAuthenticationForced breaks default authentication

Hi,

I access our SVN repository over HTTPS, but unfortunately it seems that my credentials are not used when attempting to create the new tag.

I intend to use default authentication and therefore have not specified a username or password:

release {
  scm = 'svn'
}

I think that http://issues.tmatesoft.com/issue/SVNKIT-457 has been triggered. SVNKit attempts to load credentials for the incorrect realm, and fails.

Unfortunately the SVNKit CLI doesn't seem to support forced authentication, and therefore I manually created an appropriate file in config/auth/svn.simple/ which allowed authentication to succeed.

Has anyone else reported this?

Is it ok to remove the use of setAuthenticationForced here, as it doesn't seem to actually force the validation of credentials?

Thanks,
Stu.

Release staying on trunk after release tag is created

According to the documentation page, the following command is supposed to perform a full release:

gradle release uploadArchives -preleaseVersion=1.1.0

If you were to run this command from trunk, I would expect that that command would do the following:

  • create a tag named trunk-RELEASE-1.1.5
  • switch the workspace to that tag
  • perform a full build from that tag
  • upload archives to a repository using version 1.1.5

However, it looks like the plugin simply creates the tag, so when you begin the uploadArchives task, you are still on the trunk, and so it is technically releasing the code from the trunk and not the tag. I know functionally there is no difference, but I fear it is a technicality that could cause us trouble with management if they found out.

Would it be possible to add in a switch (in svn-land, I do not know the corresponding git command) immediately following the tag command (inside of the SCMService.doTagging() method) so that after the tag is created, our workspace is actually sitting on the tag?

how does the nextVersion number get incremented

Hi,
You have a method on the SCMService.getNextVersion() which doesn't appear to get called. I'm just wondering how the version of the tag/branch is incremented each time the release is done.

e.g. if i am do 2 releases/builds using GIT on the MASTER branch how is the tag incremented
build 1 = MASTER-RELEASE-1 build 2 = MASTER-RELEASE-2

its kind of baffling me, can you show me a build script that does this

THanks
Mark

Certification path issue ; dependency on sqljet:1.1.8-SNAPSHOT

I am trying to get a simple working example going with the plugin but i am experiencing an issue:

Could not resolve org.tmatesoft.sqljet:sqljet:1.1.8-SNAPSHOT.
         > Unable to load Maven meta-data from http://maven.tmatesoft.com/content/repositories/releases/org/tmatesoft/sqljet/sqljet/1.1.8-SNAPSHOT/maven-metadata.xml.
            > Could not GET 'http://maven.tmatesoft.com/content/repositories/releases/org/tmatesoft/sqljet/sqljet/1.1.8-SNAPSHOT/maven-metadata.xml'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This is the build.gradle that i am using:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url 'http://maven.tmatesoft.com/content/repositories/releases/'
        }
    }

    dependencies {
        classpath 'au.com.ish.gradle:release:2.2.2'
    }
}

I have seen a close issue, but i am still facing the error

Override svn tag path

Hi,

Is there any configuration/properties which i can change the path of the tags when i do a release on svn?

Thank you in advance

Unresolved SqlJet dependency

Hi,

Could not resolve all dependencies for configuration ':classpath'.
   > Could not find org.tmatesoft.sqljet:sqljet:1.1.8-SNAPSHOT.
     Required by:
         :GradleFx:unspecified > au.com.ish.gradle:release:2.2.2 > org.tmatesoft
.svnkit:svnkit:1.8.0

This is what I get after invoking gradle tasks when I have added this to my build.gradle:

buildscript {
  repositories {
    mavenCentral()
    maven {
      url 'http://maven.tmatesoft.com/content/repositories/releases/'
    }
  }

  dependencies {
    classpath 'au.com.ish.gradle:release:2.2.2'
  }
}

apply plugin: 'release'

Version names instead of full number

Currently, the only way to override automatic version number guessing is to issue the following :

gradle release -PreleaseVersion=2.0.0-SNAPSHOT

It would be nice though, to pass just an alias of the version to bump (minor, major), for example:

gradle release -Pmajor

Would cause the 1.2.1 version to be bumped to 2.0.0. And the following:

gradle release -Pminor

Would cause the 1.2.1 to be bumped to 1.3.0.

This would be only applicable of course to version format of:

major.minor.build

release.scmVersion always return "abc" when using with GitHub

release.scmVersion is always returning abc while using with GitHub.
expected git's commit# as release.scmVersion value.
The documentation also not clear how release command automatically guess the next available version number in case using with github.

plugin breaks trying to start a git process

Hey!

This plugin works fine when running gradle locally, but when i try to run on our CI machine the build.gradle file can't be evaluated, and no gradle tasks at all works.

For example when running gradle tasks i get:

[Gradle] - Launching build.
[workspace] $ /var/lib/jenkins/jobs/Forecast-production-GRADLEase/workspace/gradlew -DBRANCH_TO_BUILD=gradle2 test

FAILURE: Build failed with an exception.

* Where:
Build file '/var/lib/jenkins/jobs/Forecast-production-GRADLEase/workspace/build.gradle' line: 47

* What went wrong:
A problem occurred evaluating root project 'forecast'.
> Process 'command 'git' finished with non-zero exit value 1

With --info & --debug (cut down to relevant parts)
https://gist.githubusercontent.com/rutchkiwi/ac03d610bf48aea0abfb/raw/af6cfcd24018cd62d11a7bbe44f3da63eae554a0/relase-git-problem

Any ideas on how to fix this?

Incorrect URL for maven repo in documentation

Homepage documentation should have:

maven {
      url 'http://maven.tmatesoft.com/content/repositories/releases/'
    }

instead of:

maven {
      url 'http://maven.tmatesoft.com/content/repositories/snapshots/'
    }

Unresolved SqlJet dependency

Closing #20, #25 and #30 is nonsense.
At least you can say you won't fix it.
I am still having the same issue trying to use 2.2.2:

> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve org.tmatesoft.sqljet:sqljet:1.1.8-SNAPSHOT.
     Required by:
         project : > au.com.ish.gradle:release:2.2.2 > org.tmatesoft.svnkit:svnkit:1.8.0
      > Could not resolve org.tmatesoft.sqljet:sqljet:1.1.8-SNAPSHOT.
         > Unable to load Maven meta-data from http://maven.tmatesoft.com/content/repositories/snapshots/org/tmatesoft/sqljet/sqljet/1.1.8-SNAPSHOT/maven-metadata.xml.
            > Could not GET 'http://maven.tmatesoft.com/content/repositories/snapshots/org/tmatesoft/sqljet/sqljet/1.1.8-SNAPSHOT/maven-metadata.xml'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

FYI: @glennmcallister, @greenscar, @mb720, @mpas, @pkovalenko, @prokod, @Xerosigma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.