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

Use relative path for local environment #137

Closed
delphaber opened this issue Apr 3, 2015 · 11 comments
Closed

Use relative path for local environment #137

delphaber opened this issue Apr 3, 2015 · 11 comments
Assignees
Milestone

Comments

@delphaber
Copy link
Contributor

Commit b0be2f9 introduced a note in the Movefile template: "User an absolute path here".

@Arkham do you remember why?

I think that, locally, it could be useful to use relative path when working with other developers

@delphaber delphaber added this to the v.1.3.0 milestone Apr 3, 2015
@delphaber delphaber changed the title Use local path for local environment Use relative path for local environment Apr 3, 2015
@delphaber delphaber self-assigned this Apr 3, 2015
@Arkham
Copy link
Contributor

Arkham commented Apr 4, 2015

IIRC it wasn't working :)

@whitehat101
Copy link

local:
  wordpress_path: .

Wordmove was successfully pulling content, with a local path of ".", however the find and replaces yielded incorrect results when pushing.

It seems unreasonable to insist that all developers have absolutely identical setups. I expect that placing the Movefile in the root of the WP project is the most common setup. Why not use the use the absolute location of the Movefile to determine the local.wordpress_pathif a relative path is given? Even better, would be to set the default value of local.wordpress_path to be the directory of the Movefile.

@Arkham
Copy link
Contributor

Arkham commented Jun 16, 2015

I guess we never felt the need for this feature, happy to review pull requests if you have time :)

@alessandro-fazzi
Copy link
Member

Can't afford to explain myself where's the constraint about

It seems unreasonable to insist that all developers have absolutely identical setups.

we're talking about path; you can develop sites inside /private/etc w/o Wordmove make a single problem about it, AFAIK.
Moreover when you create a new project, enter in its folder and invoke wordmove init you'll get an autofilled local -> wordpress_path in order to make it more straightforward.

What am I missing? Is all about the loss of automagic or what else?

Thanks for your clarifications.

@connormckelvey
Copy link
Contributor

In case anyone else is interested, I wrote a node script that you can use as a post-checkout hook with git. https://github.com/connormckelvey/hooks/blob/master/wordmove-post-checkout

It will run when you clone a repository and run when you switch branches. Works pretty well for my team.

@alessandro-fazzi
Copy link
Member

I've opted to write down a little wiki entry w/ your contribuition here.

It would be great to have some more details about the script. E.g. I've scanned the code and I have a little question: what it does if I'll checkout a branch from inside a subdirectory?

Anyway your idea is just really appreciated: we like very much workflow oriented tips ;)

Cheers

@connormckelvey
Copy link
Contributor

@pioneerskies not quite sure what you mean by "checkout a branch from inside a subdirectory?"
Do you mean check out a branch when Wordpress is installed in a subdirectory?

@alessandro-fazzi
Copy link
Member

Nope :)

cd wp-admin
git co other-branch

I know that isn't an usual path anyway

@connormckelvey
Copy link
Contributor

Good point. I suppose I need to write a function to find the Movefile.

@delphaber delphaber modified the milestones: v.1.4.0, v.1.3.0 Aug 28, 2015
@alessandro-fazzi alessandro-fazzi removed this from the v.1.4.0 milestone Feb 23, 2016
@alessandro-fazzi
Copy link
Member

Removing from milestone w/o mercy. I'm sorry, but more important things are there to be fixed ;)

@mukkoo mukkoo added this to the v.2.1.0 milestone Apr 11, 2016
@alessandro-fazzi
Copy link
Member

We have introduced internally the not-so-tricky-trick to use

wordpress_path: "<%= ENV['WORDPRESS_WORKS_PATH'] %>/tessile"

and so using erb interpolation and env variable convention throughout the team. It's not documented, but I feel comfortable with the "convention over implementation" approach

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

6 participants