Push local directory to a specified SVN server
This plugin requires svn
command line and Grunt ~0.4.1
.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-push-svn --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-push-svn');
In your project's Gruntfile, add a section named push_svn
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
push_svn: {
options: {
remove: false,
pushIgnore: ['**/*.tmp'],
removeIgnore: ['**/*.gif']
},
main: {
src: '/path to your local directory',
dest: 'https://svn.example.com/path/to/your/repo',
tmp: './.build'
},
},
})
Default value: undefined
If the target repo need authentication and you don't have the authentication saved, set username and password in Options.
Type: String
Type: Boolean
Default value: false
With options.remove
enabled, remote file will be removed if it does not exist in local directory.
Type: Array
Default value: []
Specify exclude patterns for options.remove
Type: Array
Default value: []
Specify exclude patterns for local files.
Type: String
Default value: "committed with grunt-push-svn"
Type: Boolean
Default value: false
Try to mkdir in remote repo if dest does not exist.
Type: String
Default value: "svn"
Path to svn(optional)
Deployment of SAE or BAE are based on SVN, so grunt-push-svn is just the perfect tool to help you do that.
grunt.initConfig({
push_svn: {
options: {},
src: '/home/dong/projects/sae_bae_project',
dest: 'https://svn.sinaapp.com/myapp/subfolder',
tmp: './tmp'
},
})
Initial release
Fix dependencies
Force ignore .svn from src
Check src existence; Print friendly message
Ignore .svn and .git files
Fix ignore files on windows
Update readme
Add option trymkdir
Fix checkout bug; travis-ci
Add authontication support
Add option svnPath
Make trymkdir
recursive