@@ -118,36 +118,42 @@ scalacOptions ++= Seq(
118118 " -feature" ,
119119)
120120
121- commands += Command .single(" preRelease" ) { (state, nextVersion) =>
122- val newState = Project
123- .extract(state)
124- .appendWithSession(
125- Seq (
126- releaseProcess := Seq (
127- checkSnapshotDependencies,
128- inquireVersions,
129- runClean,
130- runTest,
131- setReleaseVersion,
132- releaseStepTask(assembly),
133- commitReleaseVersion,
134- tagRelease,
135- releaseStepCommandAndRemaining(" publishSigned" ),
136- releaseStepCommand(" sonatypeBundleRelease" ),
137- pushChanges,
121+ commands += Command .args(" preRelease" , " <arg>" ) { (state, args) =>
122+ args match {
123+ case Seq (nextVersion, pgpKeyId) =>
124+ val newState = Project
125+ .extract(state)
126+ .appendWithSession(
127+ Seq (
128+ releaseProcess := Seq (
129+ checkSnapshotDependencies,
130+ inquireVersions,
131+ runClean,
132+ runTest,
133+ setReleaseVersion,
134+ releaseStepTask(assembly),
135+ commitReleaseVersion,
136+ tagRelease,
137+ releaseStepCommandAndRemaining(" publishSigned" ),
138+ releaseStepCommand(" sonatypeBundleRelease" ),
139+ pushChanges,
140+ ),
141+ usePgpKeyHex(pgpKeyId),
142+ ),
143+ state,
138144 )
139- ),
140- state,
141- )
142-
143- if (nextVersion == " next" )
144- Command .process(" release with-defaults" , newState)
145- else
146- Command .process(
147- s " release with-defaults release-version $nextVersion" ,
148- newState,
149- )
150145
146+ if (nextVersion == " next" )
147+ Command .process(" release with-defaults" , newState)
148+ else
149+ Command .process(
150+ s " release with-defaults release-version $nextVersion" ,
151+ newState,
152+ )
153+ case other =>
154+ println(" wrong number of arguments passed!" )
155+ state
156+ }
151157}
152158
153159commands += Command .command(" postRelease" ) { state =>
0 commit comments