Skip to content

Conversation

@peussen
Copy link

@peussen peussen commented Sep 3, 2014

First thing that i noticed when checking out your setup is that the scripts only seemed to work if they were called from the proper location. This pull request should make the location not important anymore.

Basically it first changes the current dir to the directory of the script itself, before determining a BASEDIR and the SLUG.

All references to dirname $PWD are replaces to BASEDIR to avoid having to figure out where we are every time.

@kasparsd
Copy link
Owner

kasparsd commented Sep 3, 2014

Looks great @martybel! Thanks for the patch!

kasparsd added a commit that referenced this pull request Sep 3, 2014
…ndant

Alteration so you can call the scripts from anywhere
@kasparsd kasparsd merged commit 8320417 into kasparsd:master Sep 3, 2014
@peussen peussen deleted the make_scripts_call_location_independant branch September 3, 2014 12:40
@bush
Copy link

bush commented Jan 27, 2015

This commit broke the script. The env variables GIT_WORK_TREE and GIT_DIR now point to wp_deploy/git and wp_deploy/git/.git which don't exist. I think they need to be updated to:

export GIT_WORK_TREE=${BASEDIR}/../git
export GIT_DIR=${BASEDIR}/../git/.git

What do you think?

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

Successfully merging this pull request may close these issues.

3 participants