xwp/wp-dev-lib

Ability to define an svnignore file for svn-push

frankiejarrett opened this issue · 2 comments

It would be uh-mazing if an .svnignore file could be supported in the plugin root and honored during svn-push. It would allow developers to ignore anything dev-related that they don't want in the WordPress.org repo.

Currently, it's left solely up to dev-lib to magically decide what is dev and what isn't.
#167 is related.

Yes, this is a good idea. Right now the list of excludes is hard-coded:

wp-dev-lib/svn-push

Lines 126 to 144 in 0bcb8c9

--exclude '/.david-dev' \
--exclude '/package.json' \
--exclude '/contributing.md' \
--exclude '/composer.json' \
--exclude '/Gruntfile.js' \
--exclude '/readme.md' \
--exclude '/.ci-env.sh' \
--exclude '/.dev-lib' \
--exclude '/.coveralls.yml' \
--exclude '/.git*' \
--exclude '/.jscsrc' \
--exclude '/.jshint*' \
--exclude '/.travis.yml' \
--exclude '/assets' \
--exclude '/dev-lib' \
--exclude '/svn-url' \
--exclude '/tests' \
--exclude 'phpunit.xml*' \
--exclude 'phpcs.ruleset.xml' \

    --exclude '/.david-dev' \
    --exclude '/package.json' \
    --exclude '/contributing.md' \
    --exclude '/composer.json' \
    --exclude '/Gruntfile.js' \
    --exclude '/readme.md' \
    --exclude '/.ci-env.sh' \
    --exclude '/.dev-lib' \
    --exclude '/.coveralls.yml' \
    --exclude '/.git*' \
    --exclude '/.jscsrc' \
    --exclude '/.jshint*' \
    --exclude '/.travis.yml' \
    --exclude '/assets' \
    --exclude '/dev-lib' \
    --exclude '/svn-url' \
    --exclude '/tests' \
    --exclude 'phpunit.xml*' \
    --exclude 'phpcs.ruleset.xml' \

There are two exclusion-related arguments for rsync:

     --exclude=PATTERN       exclude files matching PATTERN
     --exclude-from=FILE     read exclude patterns from FILE

So I think supporting this would be as simple as checking to see if .svnignore exists, and if so, use it as path for --exclude-file instead of manually listing out each --exclude.

This is really now obsolete now as svn-push is deprecated in favor of grunt-wp-deploy.

And besides, the .svnignore file is in itself obsolete in favor of .distignore: #202.