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

Patching the scaffold files #45

Closed
Aeotrin opened this issue Oct 4, 2016 · 4 comments
Closed

Patching the scaffold files #45

Aeotrin opened this issue Oct 4, 2016 · 4 comments

Comments

@Aeotrin
Copy link

Aeotrin commented Oct 4, 2016

What is the recommended method for handling changes to any of the files that scaffolding pulls down.
Patching them doesnt seem like a valid option as the files arent part of a specific project known to composer.

@webflo
Copy link
Member

webflo commented Oct 11, 2016

You can copy existing files from your own repo. The functionality was added in https://github.com/drupal-composer/drupal-scaffold/pull/44/files

@mike-potter
Copy link

I would like to see better support for patching files that scaffolding pulls down also. Copying existing files from my own repo, or adding files to the "excludes" section is not an ideal solution. Specifically for a file like .htaccess I'd like to apply a patch to whatever is downloaded. Then if the .htaccess is updated by the master, the patch can still be properly merged. Otherwise you are essentially "forked" from the core files.

Without adding a dependency to the composer-patcher system, one solution could be to simply execute a script when scaffolding is complete. Something similar to the post-update-cmd, which unfortunately fires before scaffolding is run.

@greg-1-anderson
Copy link
Collaborator

Try post-drupal-scaffold-cmd

@mike-potter
Copy link

Thanks, this worked great!

        "post-drupal-scaffold-cmd": [
            "cd docroot && patch -p1 <../patches/htaccess-ssl.patch"
        ]

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

No branches or pull requests

4 participants