arktekk / sbt-aether-deploy

Deploy SBT artifacts using Maven Artifact Resolver (formerly Eclipse Aether)
Other
84 stars 31 forks source link

Use 'aetherDeploy' scoped 'version' key to allow greater flexibility in version generation. #61

Closed arashi01 closed 4 years ago

arashi01 commented 4 years ago

Adds an aetherDeploy task scoped version settingKey to the default configuration to allow end user to plug into version used for deployment directly. (version in aetherDeploy / aetherDeploy / version)

Required in our case using VCS derived versions and needing to deploy pre-releases with -SNAPSHOT suffix while retaining version information.

arashi01 commented 4 years ago

@hamnis Any chance you can have a look at this? Would be great if it could make it into 0.25.0!

hamnis commented 4 years ago

why cant you use ThisBuild/version ?

arashi01 commented 4 years ago

We need to pre-process the version provided by ThisBuild / version, but only when deploying. ThisBuild / Version is derived automatically for us from VCS - similar to sbt-dynver / GItVersion etc.

Specifically, in cases of SNAPSHOT and pre-release versions we need to remove pre-release and build-metadata when deploying.

arashi01 commented 4 years ago

@hamnis by the way the change is in line with sbt Plugin Best Practices - Scoping Advices. Specifically, providing defaults with a wider scoping than they are referred to in use, to allow more flexible end-user configuration.