magedeploy2-base icon indicating copy to clipboard operation
magedeploy2-base copied to clipboard

Unable to change git_dirconfig option

Open udovicic opened this issue 7 years ago • 5 comments

In mage magedeploy2.php you can specify git_dir and app_dir to any path on disk. However, these paths are hard coded to default value of 'shop' in n98/n98-deployer package and can not be changed via configuration.

udovicic avatar Mar 05 '17 17:03 udovicic

Thanks for the report. That should be made configurable as well. I guess we need to generate the tar.gz files to a location outside of the git_dir dir as well. Otherwise there might be an endless loop whilst creating the shop package. I'll update that in time.

mwr avatar Mar 05 '17 19:03 mwr

Yeah, I got stuck with that one too. Though configuration allows passing parameters to tar command so I got around by addin '--exclude=\'*.tar.gz\'', to options of final .tar.gz. But this is kind of a hack around, it would be much nicer to have them outside the repo dir in the first place.

udovicic avatar Mar 05 '17 20:03 udovicic

I have updated magedeploy2 to generate the artifacts in a artifacts_dir. Furthermore the deployer scripts now also use an artifacts_dir where they get the packages from. So it should no longer be necessary to use --exclude.

mwr avatar Mar 06 '17 19:03 mwr

Hi,

I did check this right away, but couldn't respond earlier. Now it works as expected which is great. Just one thing, if not a problem: Regarding the artifacts_dir, it is forced to be relative path, while it would be nice to make it possible to be absolute as well. Currently if you set it to 'artifacts' it will write to '../artifacts', and be relative to 'git_dir'. Due to fact that it appends '../', it can't be set to absolute path on system.

If the general idea is ok, I can make the change and create a pull request, just checking the general idea.

udovicic avatar Mar 09 '17 18:03 udovicic

Sure I don't see why this could not be a absolute path. I am always happy about a pull request.

mwr avatar Mar 09 '17 18:03 mwr