Skip to content

Commit

Permalink
Modified the drupalcore process to not clone Drupal repo if it alread…
Browse files Browse the repository at this point in the history
…y exists
  • Loading branch information
Pedro Cambra committed Feb 22, 2015
1 parent a098587 commit c48357a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/drupalcore
Submodule drupalcore deleted from 36122d
8 changes: 6 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ var minifyHTML = require('gulp-minify-html');
var uncss = require('gulp-uncss');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var gulpif = require('gulp-if');

var paths = {
scripts: 'app/js/**/*.js',
images: 'app/images/**/*',
scss: 'app/scss/**/*.scss'
scss: 'app/scss/**/*.scss',
drupal: 'app/drupalcore'
};

// Run bower install
Expand All @@ -33,8 +35,10 @@ gulp.task('lint', function() {

// Clone or update drupalcore repo
gulp.task('drupalcore', function () {
var fs = require('fs');

return gulp.src('')
.pipe(shell(['git clone --branch 8.0.x http://git.drupal.org/project/drupal.git ./app/drupalcore'],{ 'ignoreErrors': true}))
.pipe(gulpif(!fs.existsSync(paths.drupal), shell(['git clone --branch 8.0.x http://git.drupal.org/project/drupal.git ' + paths.drupal])))
.pipe(shell(['git pull'],{ 'ignoreErrors': true, 'cwd': './app/drupalcore'}));
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"del": "^0.1.3",
"gulp": "^3.8.10",
"gulp-bower": "0.0.7",
"gulp-if": "^1.2.5",
"gulp-imagemin": "^2.0.0",
"gulp-jshint": "^1.9.0",
"gulp-minify-css": "^0.3.11",
Expand Down

0 comments on commit c48357a

Please sign in to comment.