Skip to content

Commit

Permalink
#138 publish stable version in beta repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Oct 8, 2018
1 parent 8510ba6 commit 5f44600
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions project/Bintray.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,56 @@ object Bintray extends AutoPlugin {

publishDebian in ThisBuild := {
if ((version in ThisBuild).value.endsWith("-SNAPSHOT")) sys.error("Snapshot version can't be released")
val repositoryName = if (version.value.contains('-')) "debian-beta" else "debian-stable"
val file = (debianSign in Debian).value
val bintrayCredentials = bintrayEnsureCredentials.value
btPublish(file.getName,
file,
bintrayEnsureCredentials.value,
bintrayCredentials,
bintrayOrganization.value,
repositoryName,
"debian-beta",
bintrayPackage.value,
version.value,
sLog.value,
"deb_distribution" "any",
"deb_component" "main",
"deb_architecture" "all"
)
if (!version.value.contains('-'))
btPublish(file.getName,
file,
bintrayCredentials,
bintrayOrganization.value,
"debian-stable",
bintrayPackage.value,
version.value,
sLog.value,
"deb_distribution" "any",
"deb_component" "main",
"deb_architecture" "all"
)
},

publishRpm in ThisBuild := {
if ((version in ThisBuild).value.endsWith("-SNAPSHOT")) sys.error("Snapshot version can't be released")
val repositoryName = if (version.value.contains('-')) "rpm-beta" else "rpm-stable"
val file = (packageBin in Rpm).value
val bintrayCredentials = bintrayEnsureCredentials.value
btPublish(file.getName,
file,
bintrayEnsureCredentials.value,
bintrayCredentials,
bintrayOrganization.value,
repositoryName,
"rpm-beta",
bintrayPackage.value,
(version in Rpm).value + '-' + (rpmRelease in Rpm).value,
sLog.value)
if (!version.value.contains('-'))
btPublish(file.getName,
file,
bintrayCredentials,
bintrayOrganization.value,
"rpm-stable",
bintrayPackage.value,
(version in Rpm).value + '-' + (rpmRelease in Rpm).value,
sLog.value)
}
)

Expand Down

0 comments on commit 5f44600

Please sign in to comment.