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

link_shared_paths links to user folder #248

Closed
stereodenis opened this issue Nov 4, 2014 · 7 comments
Closed

link_shared_paths links to user folder #248

stereodenis opened this issue Nov 4, 2014 · 7 comments

Comments

@stereodenis
Copy link
Contributor

when I execute mina deploy:link_shared_paths this command
echo_cmd(%{ln -s "#{deploy_to}/#{shared_path}/#{file}" "./#{file}"})
links files to /home/user folder instead of current release folder

@stereodenis
Copy link
Contributor Author

@gabskoro what do you think?

@d4be4st
Copy link
Member

d4be4st commented Jan 22, 2015

That is a problem, because when you run this link_shared_paths command as a standalone you wont cd to current release folder.

If you do not want the link_shared_paths to happen inside a deploy script, you can create a new task like this:

task :my_link_shared_paths => :environment do
  queue %[cd #{deploy_to}/#{current_path}]
  invoke :'deploy:link_shared_paths' 
end

@stereodenis
Copy link
Contributor Author

@d4be4st
"when you run this link_shared_paths command as a standalone you wont cd to current release folder"
is it normal or it is a bug?

@d4be4st
Copy link
Member

d4be4st commented Jan 22, 2015

It is normal because that task is meant to link shared paths to current folder './'
inside deploy script, before the link_shared_paths task is invoked, script changes directory to release path, and than links the shared paths.

So if you want to use the link_to_shared_paths outside deploy script you will need to change directory first.

@stereodenis
Copy link
Contributor Author

@d4be4st task mina deploy:link_shared_paths
I think it should work with current release
but it doesn't

@d4be4st
Copy link
Member

d4be4st commented Jan 22, 2015

The thing is that mina does not know what current release path is outside of deploy task. That is not stored anywhere. We could assume that it is the latest release but that might not be the case as you can symlink your current folder to any of the release folders

@stereodenis
Copy link
Contributor Author

ok

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

No branches or pull requests

2 participants