Skip to content

Commit 99b88ed

Browse files
authored
Merge pull request #27 from codacy/fix-publish-repo
Fix sonatype publishTo
2 parents 28dd64a + 3063528 commit 99b88ed

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

build.sbt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@ publishArtifact in Test := false
1919
pomIncludeRepository := { _ =>
2020
false
2121
}
22-
publishTo := {
23-
val nexus = "https://oss.sonatype.org/"
24-
if (version.value.trim.endsWith("SNAPSHOT"))
25-
Some("snapshots" at nexus + "content/repositories/snapshots")
26-
else
27-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
28-
}
22+
// Add the default sonatype repository setting
23+
publishTo := sonatypePublishTo.value
2924

3025
organizationName := "Codacy"
3126
organizationHomepage := Some(new URL("https://www.codacy.com"))

project/plugins.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ resolvers ++= Seq(DefaultMavenRepository,
77
Classpaths.sbtPluginReleases)
88

99
// Sonatype publishing
10-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.5.1")
11-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
10+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
11+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
1212

1313
// Dependency updates
14-
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.9")
14+
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.4")
1515

1616
// Coverage
1717
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
18-
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.12")
18+
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")

scripts/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
echo "Publishing version ${VERSION}"
1818
if [[ -n "$CI" ]] && [[ "$CURRENT_BRANCH" == "$PUBLISH_BRANCH" || "$CIRCLE_BRANCH" == "$PUBLISH_BRANCH" ]]; then
1919
sbt 'set version := "'"${VERSION}"'"' 'set pgpPassphrase := Some("'"$SONATYPE_GPG_PASSPHRASE"'".toCharArray)' +publishSigned
20-
sbt 'set version := "'"${VERSION}"'"' +sonatypeRelease
20+
sbt 'set version := "'"${VERSION}"'"' +sonatypeReleaseAll
2121
else
2222
sbt 'set version := "'"${VERSION}"'"' +publishLocal
2323
fi

0 commit comments

Comments
 (0)