File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
plugin/src/main/scala/com/geirsson Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -178,10 +178,21 @@ object CiReleasePlugin extends AutoPlugin {
178178 val publishCommand = getPublishCommand(currentState)
179179
180180 if (! isTag) {
181- println(
182- s " No tag published. Cannot publish an official release without a tag and Sonatype Central does not accept snapshot releases. Aborting release. "
183- )
184- currentState
181+ if (isSnapshot) {
182+ println(s " No tag push, publishing SNAPSHOT " )
183+ reloadKeyFiles ::
184+ sys.env.getOrElse(" CI_CLEAN" , " ; clean" ) ::
185+ publishCommand ::
186+ sys.env.getOrElse(" CI_SNAPSHOT_RELEASE" , " sonaRelease" ) ::
187+ currentState
188+ } else {
189+ // Happens when a tag is pushed right after merge causing the main branch
190+ // job to pick up a non-SNAPSHOT version even if TRAVIS_TAG=false.
191+ println(
192+ " Snapshot releases must have -SNAPSHOT version number, doing nothing"
193+ )
194+ currentState
195+ }
185196 } else {
186197 println(" Tag push detected, publishing a stable release" )
187198 reloadKeyFiles ::
You can’t perform that action at this time.
0 commit comments