Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

22/Use version property if available #23

Merged
merged 7 commits into from
Mar 26, 2015
Merged

22/Use version property if available #23

merged 7 commits into from
Mar 26, 2015

Conversation

friedger
Copy link
Contributor

This PR adds the possibility to make publish.version optional and define the version of the release as a project property, e.g. in a gradle file

allProjects {
  version "0.2.8"
}

or as a command line parameter

./gradlew bintrayUpload -Pversion=0.2.8 

@friedger
Copy link
Contributor Author

fixes #22

@friedger
Copy link
Contributor Author

To test, I released locally and removed the version property from build.gradle and run with -Pversion=1.0.0. The result can be seen below:

screen shot 2015-03-26 at 12 44 44

@blundell
Copy link
Contributor

should we add to the readme a link to this PR and say version can also be supplied on the command line see here

@@ -42,4 +43,8 @@ class ReleasePlugin implements Plugin<Project> {
}
}

private String getString(Project project, String propertyName, String defaultValue) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private def getProperty ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but String defaultValue

@friedger
Copy link
Contributor Author

Once released, the wiki needs to be updated as well

@blundell
Copy link
Contributor

LGETM 👍

@@ -36,8 +36,8 @@ publish {
userOrg = 'novoda'
groupId = 'com.novoda'
artifactId = 'bintray-release'
version = '0.2.7'
description = 'Oh hi, this is a nice description for a project right?'
version = '0.2.8' // since 0.2.8, version can also be supplied on the command line. [See here](https://github.com/novoda/bintray-release/pull/23)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this comment should be here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah same - looks more like something in the wiki/release notes when you create a tag

@xrigau
Copy link
Contributor

xrigau commented Mar 26, 2015

yeah either add it to the wiki or the README https://github.com/novoda/bintray-release/wiki

blundell added a commit that referenced this pull request Mar 26, 2015
22/Use version property if available
@blundell blundell merged commit a69f98a into master Mar 26, 2015
@blundell blundell deleted the 22/use_arg_version branch March 26, 2015 17:24
@ouchadam
Copy link
Contributor

do we want to do a release with this change?

@friedger
Copy link
Contributor Author

release often,..

[image: --]
Friedger Müffke
[image: http://]about.me/friedger
http://about.me/friedger

2015-03-26 18:29 GMT+01:00 Adam Brown [email protected]:

do we want to do a release with this change?

Reply to this email directly or view it on GitHub
#23 (comment).

@ouchadam
Copy link
Contributor

ouchadam commented Apr 1, 2015

This change broke releasing without specifying the version via the properties

@blundell
Copy link
Contributor

blundell commented Apr 1, 2015

😱 what shouldn't we have done?

@xrigau
Copy link
Contributor

xrigau commented Apr 2, 2015

as @ouchadam mentioned to me the issue might be that version is a reserved gradle property name so it might be picking the wrong one now

@friedger
Copy link
Contributor Author

friedger commented Apr 2, 2015

Yes, hasProperty returns true, but getProperty returns unspecified.

[image: --]
Friedger Müffke
[image: http://]about.me/friedger
http://about.me/friedger

2015-04-02 12:46 GMT+02:00 Xavi Rigau [email protected]:

as @ouchadam https://github.com/ouchadam mentioned to me the issue
might be that version is a reserved gradle property name so it might be
picking the wrong one now

Reply to this email directly or view it on GitHub
#23 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants