-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SBT Plugin (Scala Simple Build Tool) #85
Comments
From sean8...@gmail.com on February 21, 2013 21:18:41 |
From axel.fontaine.business@gmail.com on February 22, 2013 10:21:01 thanks for contributing this. You are however not the first to attempt this. Christian already made significant inroads as you can see here: https://github.com/cdedie/flyway These are the criteria I think are a must for inclusion in the main distribution:
I would recommend you two join forces and either discuss details for a common implementation here, or as part of a joint pull request. Cheers |
From axel.fontaine.business@gmail.com on March 12, 2013 09:53:50 Christian now created a pull request: #12 Could you contribute to it and give us your thoughts/submit improvements? Cheers |
+1 |
1 similar comment
+1 |
Hi everyone, Christian contributed an implementation which is now merged in master. There are however still some things I am not completely happy about including:
Please give the current implementation a spin. Any improvements/feedback welcome. Cheers |
Now that SBT 0.13 has been released, the code should be finalized and updated with the necessary changes. And then it's time to push this out the door! Pull Request welcome. Any takers? @cdedie? |
Thanks! I've been using the sbt plugin in master, and it seems to be working well. However, a couple things: Configurability:It'd be nice to have a way of accepting input; currently running against a different database or running a different group of migrations (we have migrations split into pre-release and post-release ones) involves editing the flywayUrl and flywayLocations settings in build.sbt, respectively. I made a "main" method that takes arguments for those things in a different classpath in SBT (http://www.scala-sbt.org/release/docs/Detailed-Topics/Testing.html#custom-test-configuration). That might work better for running migrations, anyways - if .scala migrations use other code from our app, that won't be available from SBT's classpath when running them from this plugin. SBT 0.13:The "large number of keys" SO post above becomes even more pressing on 0.13. I filed a ticket w/ SBT about it: sbt/sbt#857 Any suggestions for how I can help with this plugin, and getting it released? |
Rather than having tons of separate string-valued SBT settings, what about grouping them together? If not a Map[String, String] like Sean had, how 'bout a Scala case class of typed values representing flyway config? And perhaps a variant of flyway tasks could be an InputTask taking arguments to modify values in that before running? |
Also, the |
Would definitely like to give this a try. I'm new to SBT and Scala, but will do what I can. I'm running SBT 0.13.0 and Scala 2.10.2. @axelfontaine, what's the easiest way to try out this plugin? I assume I need to be running code Flyway code from master... |
You don't need to be running flyway from master. It won't currently work w/ SBT 0.13.0, only say 0.12.4. You can checkout this repo, and change the versions in pom.xml from 0-SNAPSHOT to 2.2.1. Then in the flyway-sbt-plugin directory, run "sbt publish-local" to published a built artifact to $HOME/.ivy2/local. Then you can included it in your project w/ |
Hi Leif, thank you for the many comments and suggestions. I think the first step to getting the plugin released is the SBT 0.13 compatibility. Once that is through, we can then look at polishing up the remaining bits and writing the docs (getting started and reference). Do you feel up for providing a first pull request for 0.13 compatibility? Cheers |
There's that max tuple length issue... I might have time this weekend to take a crack at something to work around that. |
Merged @cdedie 's contribution. |
Original author: christia...@gmail.com (July 27, 2011 22:11:12)
SBT Plugin
Original issue: http://code.google.com/p/flyway/issues/detail?id=147
The text was updated successfully, but these errors were encountered: