mwr / magedeploy2-base

Magento2 Deployment with Deployer (Skeleton)
MIT License
43 stars 13 forks source link

Unable to change git_dirconfig option #1

Open udovicic opened 7 years ago

udovicic commented 7 years ago

In mage magedeploy2.php you can specify _gitdir and _appdir 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.

mwr commented 7 years ago

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.

udovicic commented 7 years ago

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.

mwr commented 7 years ago

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.

udovicic commented 7 years ago

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 _artifactsdir, 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 _'gitdir'. 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.

mwr commented 7 years ago

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