mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-27 22:24:58 +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
25
gulpfile.js
25
gulpfile.js
|
@ -161,6 +161,20 @@ var gitAdd = function(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 build = series(
|
||||
|
@ -170,6 +184,16 @@ var build = series(
|
|||
lintStrings, compliment
|
||||
);
|
||||
|
||||
var deploy = series(
|
||||
clean,
|
||||
jasmine,
|
||||
jshint,
|
||||
gitDeployMergeMaster,
|
||||
build,
|
||||
gitDeployPushOrigin,
|
||||
compliment,
|
||||
);
|
||||
|
||||
var lint = series(jshint, compliment);
|
||||
|
||||
var watching = function() {
|
||||
|
@ -189,4 +213,5 @@ module.exports = {
|
|||
watching,
|
||||
build,
|
||||
test: jasmine,
|
||||
deploy,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue