Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-SNAPSHOT suffix is missing #164

Open
mrt181 opened this issue Oct 23, 2018 · 3 comments
Open

-SNAPSHOT suffix is missing #164

mrt181 opened this issue Oct 23, 2018 · 3 comments

Comments

@mrt181
Copy link

mrt181 commented Oct 23, 2018

I am using these versions

git = 2.17.0
sbt = 1.2.6
scala = 2.12.7
sbt-git = 1.0.0

Running sbt version on my project returns me the version as expected:

[info] Set current project to projectapiScala (in build file:/C:/cygwin64/home/user/sourcecode/project-api/api-scala/)
[info] Packaging C:\cygwin64\home\user\sourcecode\project-api\api-scala\target\scala-2.12\projectapiscala_2.12-1.2.0-19-gc11ba92-SNAPSHOT-sources.jar ...
[info] Done packaging.

git describe

1.2.0-19-gc11ba92

but running the build on TeamCity, our build server, the version is missing the -SNAPSHOT suffix.

[16:10:45][Step 2/3] [info] Set current project to tradingapiScala (in build file:/D:/TeamCity/buildAgent.0/work/project-api/api-scala/)
[16:10:45][Step 2/3] Plugin sbt-teamcity-logger was loaded.
[16:10:45][Step 2/3] TeamCity version='2017.2.2 (build 50909)'
[16:10:47][Step 2/3] [success] Total time: 2 s, completed 23.10.2018 15:10:47
[16:10:47][Step 2/3] [success] Total time: 0 s, completed 23.10.2018 15:10:47
[16:10:47][Step 2/3] [success] Total time: 0 s, completed 23.10.2018 15:10:47
[16:10:47][Step 2/3] Scala compiler (3m:11s)
[16:10:47][Step 2/3] [info] Packaging D:\TeamCity\buildAgent.0\work\project-api\api-scala\target\scala-2.12\projectapiscala_2.12-1.2.0-19-gc11ba92-sources.jar ...
[16:10:47][Step 2/3] Packaging D:\TeamCity\buildAgent.0\work\project-api\api-scala\target\scala-2.12\projectapiscala_2.12-1.2.0-19-gc11ba92-sources.jar ...
[16:10:47][Step 2/3] [info] Done packaging.

How can this be caused and fixed?

@sjfloat
Copy link

sjfloat commented Oct 25, 2018

We are also missing SNAPSHOT suffixes unless there are uncommitted changes.

@nigredo-tori
Copy link

We are also missing SNAPSHOT suffixes unless there are uncommitted changes.

This seems to be deliberate, judging by the setting name here. But still, it's counterintuitive that the SNAPSHOT suffix doesn't follow the isSnapshot setting.

@marcsaegesser
Copy link

The -SNAPSHOT suffix is being used to indicate uncommitted changes rather than to indicate a non-tagged commit. This causes problems for things like CI/CD pipelines, which, almost by definition, never have uncommitted changes. If a pipeline does an sbt publish it will push the artifacts into the Releases repo rathan then the Snapshots repo.

It seems like the the uncommitted changes indicator should be something like "-dirty" and let the -SNAPSHOT suffix follow the value of the isSnapshot setting.

fehu added a commit to Grupo-Abraxas/slothql that referenced this issue Jul 2, 2020
blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this issue Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants