vaticle / bazel-distribution

Bazel rules for assembling and deploying software distributions (see @vaticle for usage example)
https://bazel.build
Apache License 2.0
155 stars 53 forks source link

version_file doesn't trim the version #380

Closed anuragagarwal561994 closed 1 month ago

anuragagarwal561994 commented 11 months ago

When using a version_file we don't trim the version mentioned inside the file.

Some of the IDEs are configured to put new line on file save by default, in those cases this becomes a problem as there will be a newline and the jars are tried to be published including new-line which fails.

nhumblot commented 1 month ago

Thank you for opening this. It caused https://github.com/jeremylong/DependencyCheck/issues/6688.

farost commented 1 month ago

Our assemble-maven snapshot doesn't have trimming for versions, indeed, which is a problem.

We don't face this issue only because we use --define version=$(cat VERSION) in our test and release pipelines (this way handles trimming for us) instead of passing the version_file into the rule.

nhumblot commented 1 month ago

Thank you for your reactivity!