Skip to content

Commit 5d025d9

Browse files
committed
chore: Publish to new nightly
1 parent 2068de5 commit 5d025d9

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

project/Build.scala

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,10 +1929,24 @@ object Build {
19291929
publishMavenStyle := true,
19301930
isSnapshot := version.value.contains("SNAPSHOT"),
19311931
publishTo := {
1932-
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
1933-
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
1934-
else localStaging.value
1932+
if (sys.env.get("NEWNIGHTLY").contains("yes")) {
1933+
Some(sys.env("MAVEN_REPOSITORY_REALM") at sys.env("MAVEN_REPOSITORY_URL"))
1934+
} else if (isSnapshot.value) {
1935+
Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/")
1936+
} else
1937+
localStaging.value
19351938
},
1939+
credentials ++= (
1940+
if (sys.env.get("NEWNIGHTLY").contains("yes")) {
1941+
for {
1942+
username <- sys.env.get("MAVEN_REPOSITORY_USER")
1943+
token <- sys.env.get("MAVEN_REPOSITORY_TOKEN")
1944+
} yield Credentials(sys.env("MAVEN_REPOSITORY_REALM"), sys.env("MAVEN_REPOSITORY_HOST"), username, token)
1945+
}
1946+
else
1947+
// The old build credentials are configured differently
1948+
None
1949+
).toList,
19361950
publishConfiguration ~= (_.withOverwrite(true)),
19371951
publishLocalConfiguration ~= (_.withOverwrite(true)),
19381952
projectID ~= {id =>

0 commit comments

Comments
 (0)