Skip to content

"Snapshot releases must have -SNAPSHOT version number, doing nothing" despite NON-SNAPSHOT version #392

@tribbloid

Description

@tribbloid

I'm running ci-release locally to publish to maven-central as the project is only tested on CI as a git submodule.

All environments variables (including credentials) are defined in a bash script prior to publishing:

#!/bin/bash

# Script to run sbt ci-release for publishing to Sonatype Central

# Exit on error
set -e

# Set required environment variables
export CI=true  # Required by sbt-ci-release

# <credentials for signing and publishing omitted>

# Optional: Set the tag for release (if not set, it will use the current git tag)
export CI_RELEASE_TAG="v3.2.19.0"

# Clean any previous builds
echo "Cleaning previous builds..."
sbt clean

# Run the release
echo "Running sbt ci-release..."
sbt ci-release

after setting CI_RELEASE_TAG and execute it, I got the following error

$ git status
HEAD detached at v3.2.19.1
nothing to commit, working tree clean
$ ./dev/release.sh 
Cleaning previous builds...
[info] welcome to sbt 1.11.2 (Ubuntu Java 17.0.15)
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project/project/project
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project/project
[info] loading settings for project scalatestplus-junit5-build from metals.sbt, plugins.sbt...
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project
[info] loading settings for project scalatestplus-junit5 from build.sbt...
[info] set current project to junit-5.13 (in build file:/home/peng/git-release/scalatestplus-junit5/)
[success] Total time: 0 s, completed Jul. 19, 2025, 7:27:59 p.m.
Running sbt ci-release...
[info] welcome to sbt 1.11.2 (Ubuntu Java 17.0.15)
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project/project/project
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project/project
[info] loading settings for project scalatestplus-junit5-build from metals.sbt, plugins.sbt...
[info] loading project definition from /home/peng/git-release/scalatestplus-junit5/project
[info] loading settings for project scalatestplus-junit5 from build.sbt...
[info] set current project to junit-5.13 (in build file:/home/peng/git-release/scalatestplus-junit5/)
Running ci-release.
  branch=<unknown>
gpg (GnuPG) 2.4.4
gpg: key E1D4CD2CE69ED220: "tribbloid <[email protected]>" not changed
gpg: key E1D4CD2CE69ED220: secret key imported
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
gpg:  secret keys unchanged: 1
Snapshot releases must have -SNAPSHOT version number, doing nothing

the last sentence doesn't make sense, both the git tag and the environment variable has clearly defined the number as 3.2.19.1, without snapshot. How did this happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions