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

Support -SNAPSHOT versions when generating RPMs by default #971

Closed
keirlawson opened this issue May 1, 2017 · 5 comments
Closed

Support -SNAPSHOT versions when generating RPMs by default #971

keirlawson opened this issue May 1, 2017 · 5 comments

Comments

@keirlawson
Copy link
Contributor

keirlawson commented May 1, 2017

Expected behaviour

Running rpm:packageBin with a version of 1.0.0-SNAPSHOT produces an rpm with name myapp-1.0.0-SNAPSHOT.rpm

Actual behaviour

Running rpm:packageBin with a version of 1.0.0-SNAPSHOT produces a stack trace as hyphens are not supported in RPM versions

Information

Using version 1.1.5 with SBT 0.13.5.2 on Fedora.

It is possible to work round this by manually setting version in Rpm and rpmRelease, however it would be nice if the default behaviour was to do this automatically, as the Maven RPM plugin does.

@muuki88
Copy link
Contributor

muuki88 commented May 7, 2017

Thanks for your feature request @keirlawson .

If you have time and motivation to add this feature, I'm happy to give you some guidance on this. It should be pretty straightforward.

@keirlawson
Copy link
Contributor Author

Yep, should be able to carve out some time next week, pointers appreciated!

@muuki88
Copy link
Contributor

muuki88 commented May 12, 2017

Awesome :)

As you pointed out the version in Rpm is the one we should validate / transform. I guess you could write a simple method replacing the invalid characters in version in Rpm.

The responsbile line is here: https://github.com/sbt/sbt-native-packager/blob/master/src/main/scala/com/typesafe/sbt/packager/rpm/RpmPlugin.scala#L108

@keirlawson
Copy link
Contributor Author

Have submitted a PR for master, should I also create one for the stable branch (1.1.x?) or is a stable release of 1.2.0 imminent?

@muuki88
Copy link
Contributor

muuki88 commented Jun 5, 2017

I'll plan to release the 1.2.0 this week 😊
Nevertheless thanks for asking 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants