File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 PGP_SECRET : ${{ secrets.SIGNING_KEY }}
2222 SONATYPE_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
2323 SONATYPE_USERNAME : ${{ secrets.MAVEN_USERNAME }}
24+ BUILD_RELEASE : true
Original file line number Diff line number Diff line change 11import java .io .FileInputStream
22import java .util .Properties
33import sbt .ThisBuild
4+ import scala .sys .process .Process
45
56val scala3Version = " 3.3.7"
67val scala2Version = " 2.13.18"
@@ -130,10 +131,14 @@ lazy val root = project
130131 publishLocalGradleDependencies := {
131132 import scala .sys .process .*
132133 val rootDir = (ThisBuild / baseDirectory).value
133- val command = Process (
134- " ./gradlew" :: " publishToMavenLocal" :: Nil ,
135- rootDir
136- )
134+ val commandArgs =
135+ List (
136+ List (" ./gradlew" ),
137+ if (! version.value.endsWith(" -SNAPSHOT" )) List (" -PbuildRelease=true" ) else Nil ,
138+ List (" publishToMavenLocal" )
139+ ).flatten
140+
141+ val command = Process (commandArgs, rootDir)
137142 val log = streams.value.log
138143 val exitCode = command ! log
139144 if (exitCode != 0 ) {
You can’t perform that action at this time.
0 commit comments