Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
akkumar opened this Issue Dec 5, 2012 · 6 comments

Comments

Projects
None yet
3 participants

akkumar commented Dec 5, 2012

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
"

akkumar commented Dec 5, 2012

$ gradle --version


Gradle 1.2

Gradle build time: Wednesday, 12 September, 2012 10:46:02 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_37 (Sun Microsystems Inc. 20.12-b01)
OS: Linux 3.2.0-34-generic amd64

Owner

ari commented Dec 5, 2012

Move the release{} block out of the subprojects and into the top level.

Owner

ari commented Dec 5, 2012

Oh, and switch to the 2.1 of this plugin. Just released yesterday... I"ll update the readme now.

@ari ari closed this Dec 5, 2012

kutzi commented Aug 2, 2013

I've got exactly the same problem with 2.1.3.
build.gradle:
buildscript {
repositories {
mavenCentral()
}

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

apply plugin: 'release'
version = release.projectVersion

release {
scm = 'svn'
}

$ gradle build

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

kutzi commented Aug 2, 2013

Found the problem, I must define the version after the release block - i.e.

release {
scm = 'svn'
}
version = release.projectVersion

Then it works. The documentation says that the default is 'svn' which is obviously not true. Could you please update the documentation to fix this (or fix the implementation according to the docs) and also state that the order is important?

Owner

ari commented Aug 2, 2013

Thanks, I'll update the docs now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment