-
Notifications
You must be signed in to change notification settings - Fork 28
Support snapshot releases from develop
#152
Conversation
core/build.gradle
Outdated
['bintrayRepo': 'n/a', 'bintrayUser': 'n/a', 'bintrayKey': 'n/a'] : | ||
new File("${System.getenv('BINTRAY_PROPERTIES')}") | ||
} | ||
using(cli).or(bintrayCredentials()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really cool 😎
core/build.gradle
Outdated
publish { | ||
def generateVersion = { | ||
boolean isSnapshot = cli['bintraySnapshot'].or(false).boolean | ||
return isSnapshot ? System.getenv('GIT_COMMIT')?:'SNAPSHOT' : version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git commit or jenkins build number?
I'm leaning towards build number as it's easier to communicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I had no idea tbh :D
we can pick other values too, but I am happy to go for BUILD_NUMBER
small question around the variable to build the version out of, otherwise looking great! 💯 |
good point about the badges. |
@Mecharyry I started there, but then it looked ugly, and decided for the additional section. we can add those badges in there if you prefer? (the link in there is already pointing to the last snapshot) |
Problem
When we work on a new feature or a bug fix we would like to be able to use a new snapshot of the library without releasing to JCenter.
Solution
We have decided to use a new Bintray repo (https://bintray.com/novoda/snapshots) where to push such builds. This PR adds the necessary Gradle setup that allows us to define whether a certain build on the CI needs to land to the snapshots repo or not.
A new CI job has been configured:
develop
changes (ie: after a feature branch is merged)Test(s) added
It's all Gradle stuff, so no automated test. I had to check manually whether the inputs were correctly handled in the build script.
Screenshots
No UI changes, therefore no screenshots.
Paired with
Nobody