Changeset 517 for Dev/trunk/Gruntfile.js
- Timestamp:
- 03/14/14 16:11:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/Gruntfile.js
r516 r517 8 8 // TASKS 9 9 10 // default task 10 11 grunt.registerTask('default', ['compile']); 11 grunt.registerTask('compile', ['svn-ignore:compile' 12 // development 13 grunt.registerTask('compile', ['path-check:svn' 14 ,'svn-ignore:compile' 12 15 ,'jshint:lint-sources' 13 16 ,'htmlhint:lint' … … 22 25 //,'amd-check' // too smart about plugins, r.js can't find them 23 26 ]); 27 grunt.registerTask('run', ['path-check:foreman' 28 ,'compile' 29 ,'foreman:dev']); 24 30 grunt.registerTask('build', ['compile' 25 31 ,'clean:build' … … 27 33 ,'dojo:build' 28 34 ]); 29 grunt.registerTask('deploy', ['path-check:deploy', 30 'svninfo', 31 'build', 32 'git_deploy:deploy']); 35 grunt.registerTask('run-build', ['path-check:foreman' 36 ,'build' 37 ,'foreman:build']); 38 grunt.registerTask('deploy', ['path-check:svn' 39 ,'path-check:git' 40 ,'svninfo' 41 ,'build' 42 ,'git_deploy:deploy']); 43 // database management 44 grunt.registerTask('db-backup-cloud-to-dated-local', 45 ['path-check:heroku' 46 ,'heroku-config' 47 ,'http:db-backup-cloud-to-dated-local']); 48 grunt.registerTask('db-pull-cloud-to-local', 49 ['path-check:heroku' 50 ,'heroku-config' 51 ,'http:db-pull-cloud-to-local']); 52 grunt.registerTask('db-push-local-to-cloud', 53 ['path-check:heroku' 54 ,'heroku-config' 55 ,'http:db-push-local-to-cloud']); 33 56 34 57 // FILES AND FOLDERS … … 46 69 47 70 // TASK CONFIG 48 71 49 72 grunt.initConfig({ 73 localDbURL: "http://localhost:5984", 74 timestamp: "<%= grunt.template.today(\"UTC:yyyymmdd't'HHMMss'z'\") %>", 75 50 76 'amd-check': { 51 77 files: [ srcDir+'client/qed-client/**/*.js' ] … … 73 99 releaseDir: '../../'+buildDir }} 74 100 }, 101 foreman: { 102 dev: { 103 options: { 104 cwd: srcDir 105 } 106 }, 107 build: { 108 options: { 109 cwd: buildDir 110 } 111 } 112 }, 75 113 git_deploy: { 76 114 deploy: { … … 83 121 } 84 122 }, 123 'heroku-config': { 124 options: { 125 app: 'quod-erat', 126 keys: ['CLOUDANT_URL'] 127 } 128 }, 85 129 htmlhint: { 86 130 options: { htmlhintrc: srcDir+".htmlhintrc" }, … … 89 133 src: ['client/*.html', 'client/qed-client/**/*.html'] }]} 90 134 }, 135 http: { 136 'db-backup-cloud-to-dated-local': { 137 options: { 138 url: "<%= localDbURL %>/_replicate", 139 method: 'POST', 140 body: { 141 source: "<%= herokuConfig.CLOUDANT_URL %>/qed", 142 target: "qed-<%= timestamp %>", 143 create_target: true 144 }, 145 json: true 146 } 147 }, 148 'db-pull-cloud-to-local': { 149 options: { 150 url: "<%= localDbURL %>/_replicate", 151 method: 'POST', 152 body: { 153 source: "<%= herokuConfig.CLOUDANT_URL %>/qed", 154 target: "qed" 155 }, 156 json: true 157 } 158 }, 159 'db-push-local-to-cloud': { 160 options: { 161 url: "<%= localDbURL %>/_replicate", 162 method: 'POST', 163 body: { 164 source: "qed", 165 target: "<%= herokuConfig.CLOUDANT_URL %>/qed" 166 }, 167 json: true 168 } 169 } 170 }, 91 171 jshint: { 92 172 'lint-sources': { options: { jshintrc: srcDir+".jshintrc" }, … … 104 184 }, 105 185 'path-check': { 106 'deploy': { 107 src: [ 'git', 'svn' ] 186 'heroku': { 187 src: ['heroku'] 188 }, 189 'foreman': { 190 src: ['foreman'] 191 }, 192 'svn': { 193 src: ['svn'] 194 }, 195 'git': { 196 src: ['git'] 108 197 } 109 198 }, … … 164 253 grunt.loadNpmTasks('grunt-git-deploy'); 165 254 grunt.loadNpmTasks('grunt-htmlhint'); 255 grunt.loadNpmTasks('grunt-http'); 166 256 grunt.loadNpmTasks('grunt-jsonlint'); 167 257 grunt.loadNpmTasks('grunt-path-check');
Note: See TracChangeset
for help on using the changeset viewer.