-
Notifications
You must be signed in to change notification settings - Fork 53
Factor out bintray credentials to a setting key #69
Conversation
* also allow to provide bintray credentials via ** environment variable ** system property
9dbae21
to
6d0c3f8
Compare
In the meantime I have released
so I can use tag based automatic releases from Travis CI. |
@softprops what do you think could be improved, so this PR gets merged? After looking at your past discussions and at some other sbt plugins, I think I should rework this PR to leverage sbt support for credentials. WDYT? |
I'd also curious about this PR, I'd like to make a small change to reduce the warnings for missing bintray credentials, and I'd like to base it off of these changes if they are going to be merged soon. |
@@ -32,6 +32,9 @@ trait BintrayKeys { | |||
val bintrayCredentialsFile = settingKey[File]( | |||
"File containing bintray api credentials") | |||
|
|||
val bintrayCredentials = settingKey[Option[BintrayCredentials]]( | |||
"Bintray api credentials") |
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.
sbt already has a setting for managing credentials - the credentials
setting. We shouldn't be introducing a new setting here when sbt already provides this, it's just frustrating because it means bintray is doing something in a different way to every other plugin that does credentials out there, and also means you usually need to define the bintray credentials twice, once for the bintray resolver to use via the standard mechanism, and the other for the bintray plugin to use via this setting.
The other advantage of using credentials
is that you can add these credentials globally in ~/.sbt/0.13/global.sbt
, without having to add the bintray plugin globally.
Hey @2m, what's happening with this PR? |
This PR should not be merged, but instead changed to use the |
Understood! Thanks for the update @2m |
Here is my work in progress PR: https://github.com/2m/bintray-sbt/commits/wip-%2324-%2325-sbt-credentials-2m There is quite a bit of progress there. But I got stuck when making |
My workaround to use secure env vars on Travis CI is to run a script that includes: if [[ "$TRAVIS_PULL_REQUEST" == "false"
&& "$TRAVIS_BRANCH" == "master"
&& "$TRAVIS_SECURE_ENV_VARS" == "true"
]]; then
mkdir ~/.bintray
cat > ~/.bintray/.credentials <<EOF
realm = Bintray API Realm
host = api.bintray.com
user = dwijnand
password = $BINTRAY_API_KEY
EOF
fi |
bintray-sbt doesn't use the credentials key On Wed, 23 Nov 2016, 18:36 Schmitt Christian, notifications@github.com
|
Also allow to provide bintray credentials via environment variable or system property. Resolves #25.
This PR also adds
sbt-git
plugin, which allows automatic version management depending on the latest tag in git. In addition to clean version management this is also a one step forward to tag based releases (only step required for a release is to create a tag on some commit).