mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-28 06:35:01 +02:00
Try to add deploy command to gulp
This commit is contained in:
parent
ef48f02661
commit
8c25dae8da
1 changed files with 26 additions and 1 deletions
27
gulpfile.js
27
gulpfile.js
|
@ -161,6 +161,20 @@ var gitAdd = function(done) {
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var gitDeployMergeMaster = function(done) {
|
||||||
|
execSync('git checkout gh-pages && git merge master -m "merge master"');
|
||||||
|
done();
|
||||||
|
};
|
||||||
|
|
||||||
|
var gitDeployPushOrigin = function(done) {
|
||||||
|
execSync('git commit -am "rebuild for prod" && ' +
|
||||||
|
'git push origin gh-pages && ' +
|
||||||
|
'git branch -f trunk gh-pages && ' +
|
||||||
|
'git checkout master'
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
var fastBuild = series(clean, ifyBuild, style, buildIndexDev, jshint);
|
var fastBuild = series(clean, ifyBuild, style, buildIndexDev, jshint);
|
||||||
|
|
||||||
var build = series(
|
var build = series(
|
||||||
|
@ -168,7 +182,17 @@ var build = series(
|
||||||
miniBuild, style, buildIndexProd,
|
miniBuild, style, buildIndexProd,
|
||||||
gitAdd, jasmine, jshint,
|
gitAdd, jasmine, jshint,
|
||||||
lintStrings, compliment
|
lintStrings, compliment
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var deploy = series(
|
||||||
|
clean,
|
||||||
|
jasmine,
|
||||||
|
jshint,
|
||||||
|
gitDeployMergeMaster,
|
||||||
|
build,
|
||||||
|
gitDeployPushOrigin,
|
||||||
|
compliment,
|
||||||
|
);
|
||||||
|
|
||||||
var lint = series(jshint, compliment);
|
var lint = series(jshint, compliment);
|
||||||
|
|
||||||
|
@ -189,4 +213,5 @@ module.exports = {
|
||||||
watching,
|
watching,
|
||||||
build,
|
build,
|
||||||
test: jasmine,
|
test: jasmine,
|
||||||
|
deploy,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue