-
Notifications
You must be signed in to change notification settings - Fork 492
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
Run deploy outside of app directory #3
Comments
To be in line with Rake's usage, I believe should be The modification here will be very minimal, this line would just have to be suppressed if |
This one-code-line edit should do the trick: diff --git a/bin/mina b/bin/mina
index 6379630..05c1ca7 100755
--- a/bin/mina
+++ b/bin/mina
@@ -26,7 +26,10 @@ Rake.application.instance_eval do
standard_exception_handling do
# Initialize Rake and make it think it's Mina.
init 'mina'
- @rakefiles = ['Minafile', 'config/deploy.rb']
+
+ # Assume different default Rakefiles.
+ # (The only way a @rakefiles can have multiple values is if -f isn't specified.)
+ @rakefiles = ['Minafile', 'config/deploy.rb'] if @rakefiles.size > 1
# Workaround: Rake 0.9+ doesn't record task descriptions unless it's needed.
# Need it for 'mina help' |
This is in |
Yep, totally. I cant believe i missed that -f option in rake. |
To confirm, does this mean I can use mina on a central deployment server which does not have access to the source code and then use it like so: mina -f apps/app1.rb
# => Deploys app 1
mina -f apps/app2.rb
# => Deploys app 2 |
Indeed you may, @garethrees. |
Yeah, the syntax to deploy would be:
Im using it the same way |
Amazing, thanks both |
Im using mina to deploy multiple apps from single server, which does not have project's source code, but only has scripts to deploy (mina scripts). I created a simple hack that allows you to pass
--config
parameter.So the use case is something like this:
Would it be possible to integrate into master?
You can check out my implementation here - https://github.com/sosedoff/mina/tree/external-config
Not sure if its a correct way to integrate with rake.
The text was updated successfully, but these errors were encountered: