Skip to content

Commit

Permalink
Renamed deploy folder, delete it before build
Browse files Browse the repository at this point in the history
  • Loading branch information
atesgoral committed Nov 4, 2015
1 parent 5df946a commit 02ec2c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
deploy
.deploy
13 changes: 9 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var gulp = require('gulp'),
tap = require('gulp-tap'),
reduce = require('gulp-reduce-file'),
ghPages = require('gulp-gh-pages'),
del = require('del'),
HrmCpu = require('hrm-cpu'),
levels = require('hrm-level-data'),
inboxGenerator = require('hrm-level-inbox-generator'),
Expand Down Expand Up @@ -123,9 +124,13 @@ gulp.task('validate-programs', [ 'validate-folders' ], function () {
}));
});

gulp.task('benchmark-programs', [ 'validate-programs' ], function () {
gulp.task('clean', function () {
return del([ '.deploy' ]);
});

gulp.task('benchmark-programs', [ 'clean', 'validate-programs' ], function () {
return gulp.src('*/*.asm')
.pipe(reduce('manifest.json', function (file, programs) {
.pipe(reduce('data/manifest.json', function (file, programs) {
var path = explodePath(file.path);

var level = levelMap[path.levelNumber];
Expand Down Expand Up @@ -211,12 +216,12 @@ gulp.task('benchmark-programs', [ 'validate-programs' ], function () {
}, function (programs) {
return programs;
}, []))
.pipe(gulp.dest('deploy'));
.pipe(gulp.dest('.deploy'));
});

gulp.task('deploy', [ 'benchmark-programs' ], function () {
if (process.env.TRAVIS_BRANCH === 'master' && process.env.TRAVIS_PULL_REQUEST === 'false') {
return gulp.src('deploy/**/*')
return gulp.src('.deploy/**/*')
.pipe(ghPages({
remoteUrl: 'https://' + process.env.GITHUB_USERNAME + ':' + process.env.GITHUB_TOKEN + '@github.com/' + process.env.TRAVIS_REPO_SLUG + '.git'
}));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"devDependencies": {
"chalk": "^1.1.1",
"deep-equal": "^1.0.1",
"del": "^2.0.2",
"gulp": "~3.9.0",
"gulp-gh-pages": "^0.5.4",
"gulp-reduce-file": "0.0.1",
Expand Down

0 comments on commit 02ec2c9

Please sign in to comment.