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

Support snapshot releases from develop #152

Merged
merged 8 commits into from
May 11, 2018
Merged

Support snapshot releases from develop #152

merged 8 commits into from
May 11, 2018

Conversation

mr-archano
Copy link
Contributor

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:

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

['bintrayRepo': 'n/a', 'bintrayUser': 'n/a', 'bintrayKey': 'n/a'] :
new File("${System.getenv('BINTRAY_PROPERTIES')}")
}
using(cli).or(bintrayCredentials())
Copy link
Contributor

Choose a reason for hiding this comment

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

this is really cool 😎

publish {
def generateVersion = {
boolean isSnapshot = cli['bintraySnapshot'].or(false).boolean
return isSnapshot ? System.getenv('GIT_COMMIT')?:'SNAPSHOT' : version
Copy link
Contributor

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

Copy link
Contributor Author

@mr-archano mr-archano May 10, 2018

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

@ouchadam
Copy link
Contributor

small question around the variable to build the version out of, otherwise looking great! 💯

@Mecharyry
Copy link
Contributor

screen shot 2018-05-11 at 09 08 35
Is it worth us adding a badge to the repo, pointing to snapshots?

@ouchadam
Copy link
Contributor

good point about the badges.
It might be easier to have both master and snapshot badges

@mr-archano
Copy link
Contributor Author

@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)

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.

3 participants