A Question about symlinks on the server
Wondering if this is possible.
in my local php storm project I have module folders
jrAction
jrBlog
jrCore
jrFollower
jrImage
jrLike
jrMailer
jrMarket
jrPage
In the beginning of the project these folders contain the module files. They are uploaded to the server.
Via the system on the server when there is a module update from the module creators, the folder names on the server turn into symlinks to the most current version of the module. eg:
*jrAction
jrAction-release-1.1.2
jrAction-release-1.1.3
jrAction-release-1.1.4
*jrBlog
jrBlog-release-1.1.5
jrBlog-release-1.1.6
jrBlog-release-1.1.7
jrCore
jrFollower
jrImage
jrLike
jrMailer
jrMarket
jrPage
So now jrAction and jrBlog are symlinks on the server to the most up-to-date version of the module.
QUESTION:
Is it possible to set up phpstorm so that when I download the local version of the module that it will follow the symlink and pull the contents of the symlink into my jrAction or jrBlog module's folder?
WHY?:
Because locally I use GIT for version control and if i download
jrAction-release-1.1.2
jrAction-release-1.1.3
jrAction-release-1.1.4
Git treats them as 3 separate new un-versioned modules where what I really want is just the updated changes to overlay themselves on my current version of the module's files in my local system.
Thanks.
请先登录再写评论。
Can you elaborate your setup and your goals?
jrAction-release-1.* are symlinks? What are they pointing to? What do you mean by " local version of the module"? What content should be in jrAction, jrBlog as result?
the base module name is the symlink to the latest version of the module.
So /jrAudio on the server is a simlink.
I want to pull the contents of wherever that simlink points to down into the
/jrAudio
folder on my local machine.
When I upload any changes I make to /jrAudio I want them to follow the symlink and land wherever that symlink points to.
I don't want to think about any of the versions that exist on the server. Just the current version.
So another way of saying it is "Treat the local /jrAudio folder as the symlink is treating it.". When I access a symlink path, i dont need to know its a symlink, it feels like its just a normal folder.
Thats what I want to have happen in PhpStorm too. I want to be able to download the contents of the symlink to my local machine and then re-upload them to the server.
It's totally possible on Mac/Linux (not sure about Windows links) with the help of deployment option.
See tutorial: http://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm ,
and also webinar: http://blog.jetbrains.com/phpstorm/2014/03/webinar-recording-deployment-with-phpstorm/ .
I watched the youtube video in the second link. Its very detailed. I knew most of the stuff in there already, but the Phing was new to me.
The first link might be interesting once i get approved to look at it:
In the video there wasn't any reference to symlinks. Perhaps my explanation wasn't clear.
PhpStorm respects the symlink in one direction, but not the other.
eg:
on my local machine if i add a file to /modules/jrAudio folder while 'automatic upload' is on, the file will be created at the end of the symlink.
Local machine:
/module/jrAudio/new-file.tpl
Will get created at
/module/jrAudio-release-1.4.0/new-file.tpl
becuase the symlink at /jrAudio/ points to /jrAudio-release-1.4.0/
BUT... if i right click on my local /jrAudio/ folder and select 'download'
EXPECTED RESULTS:
That whatever files there are at the end of the symlink folder will get downloaded into the folder on my local machine.
ACTUAL RESULTS:
A new folder is created on the local machine with the same name as the folder that is symlinked to on the server. I now have 2 folders for the same module on local.
/modules/jrAudio/
/modules/jrAudio-release-1.4.0/
Got my access to Confluence approved just now. Tried the link again:
so now im ultra curious as to what im missing out on. Super secret stuff.... ;)
Please try again, should work now, there was some technical issue with the page and now the problem seems to be resolved, so tutorial should be available for you by the link. Thank you!
Sorry, unfortunately it is not possible to "download" files with symlinks, only automatic upload and manual refresh on "Browse remote hsot" view.
Feel free to describe the feature request more detailed in our tracking system YouTrack: http://youtrack.jetbrains.com/issues/WI#newissue=yes .