Skip to content

Commit e38463d

Browse files
authored
Merge pull request #29 from codacy/fix-publish-repo
Fix publish repo
2 parents f35a448 + 250da4f commit e38463d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

build.sbt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ ThisBuild / homepage := Some(url("http://www.github.com/codacy/codacy-plugins-ap
6565
ThisBuild / pomIncludeRepository := { _ =>
6666
false
6767
}
68-
ThisBuild / publishTo := sonatypePublishTo.value
69-
// ThisBuild / publishTo := {
70-
// val nexus = "https://oss.sonatype.org/"
71-
// if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
72-
// else Some("releases" at nexus + "service/local/staging/deploy/maven2")
73-
// }
68+
ThisBuild / publishTo := {
69+
val nexus = "https://oss.sonatype.org/"
70+
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
71+
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
72+
}
7473
ThisBuild / publishMavenStyle := true
7574
ThisBuild / publishArtifact in Test := false

scripts/publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ fi
1616

1717
echo "Publishing version ${VERSION}"
1818
if [[ -n "$CI" ]] && [[ "$CURRENT_BRANCH" == "$PUBLISH_BRANCH" || "$CIRCLE_BRANCH" == "$PUBLISH_BRANCH" ]]; then
19-
sbt 'set version := "'"${VERSION}"'"' 'set pgpPassphrase := Some("'"$SONATYPE_GPG_PASSPHRASE"'".toCharArray)' +publishSigned
20-
sbt 'set version := "'"${VERSION}"'"' +sonatypeReleaseAll
19+
sbt ++2.11.12 'set version := "'"${VERSION}"'"' 'set pgpPassphrase := Some("'"$SONATYPE_GPG_PASSPHRASE"'".toCharArray)' publishSigned sonatypeRelease
20+
sbt ++2.12.4 'set version := "'"${VERSION}"'"' 'set pgpPassphrase := Some("'"$SONATYPE_GPG_PASSPHRASE"'".toCharArray)' publishSigned sonatypeRelease
2121
else
2222
sbt 'set version := "'"${VERSION}"'"' +publishLocal
2323
fi

0 commit comments

Comments
 (0)