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

DockerAlias should have version scoped to Docker #905

Merged
merged 1 commit into from
Nov 4, 2016
Merged

DockerAlias should have version scoped to Docker #905

merged 1 commit into from
Nov 4, 2016

Conversation

rbellamy
Copy link

@rbellamy rbellamy commented Nov 4, 2016

When the SBT project version follows semantic versioning, and includes build metadata (e.g. 1.0.0+abcdef1) the Docker tag and publish is broken. The most reasonable way to handle this is to modify the build.sbt to adjust the version in Docker scope.

Right now, the DockerAlias pulls the version from the project scope.

-- Modified build.sbt --

(version in Docker) := version.value.split('+')(0)

-- In SBT console --

[sample-server] $ show dockerAlias
[info] DockerAlias(Some(some.registry),None,aergo-server,Some(1.0.0+abcdef1))
[sample-server] $ show docker:version
[info] 1.0.0

-- In SBT console after fix --

[sample-server] $ show dockerAlias
[info] DockerAlias(Some(some.registry),None,aergo-server,Some(1.0.0))
[sample-server] $ show docker:version
[info] 1.0.0

When the SBT project version follows semantic versioning, and includes build metadata (e.g. 1.0.0+abcdef1) the Docker tag and publish is broken. The most reasonable way to handle this is to modify the build.sbt to adjust the version in Docker scope.

Right now, the DockerAlias pulls the version from the project scope.

-- Modified build.sbt --
(version in Docker) := version.value.split('+')(0)
-- In SBT console --
[sample-server] $ show dockerAlias
[info] DockerAlias(Some(some.registry),None,aergo-server,Some(1.0.0+abcdef1))
[sample-server] $ show docker:version
[info] 1.0.0
-- In SBT console after fix --
[sample-server] $ show dockerAlias
[info] DockerAlias(Some(some.registry),None,aergo-server,Some(1.0.0))
[sample-server] $ show docker:version
[info] 1.0.0
@muuki88 muuki88 added the docker label Nov 4, 2016
Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you :)

@muuki88 muuki88 merged commit b150ca8 into sbt:master Nov 4, 2016
@rbellamy rbellamy deleted the scoped-docker-version branch December 8, 2016 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants