mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Errored if grunt master
run in dirty working directory (#10476)
refs #9441 * Refactored master script * Added check for working directory
This commit is contained in:
parent
bdd57b36cf
commit
92621159a6
1 changed files with 13 additions and 3 deletions
16
Gruntfile.js
16
Gruntfile.js
|
@ -214,9 +214,19 @@ const configureGrunt = function (grunt) {
|
|||
command: function () {
|
||||
var upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream';
|
||||
grunt.log.writeln('Pulling down the latest master from ' + upstream);
|
||||
return 'git checkout master; git pull ' + upstream + ' master; ' +
|
||||
'yarn; git submodule foreach "git checkout master && git pull ' +
|
||||
upstream + ' master"';
|
||||
return `
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Working directory is not clean, do you have uncommited changes? Please commit, stash or discard changes to continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout master
|
||||
git pull ${upstream} master
|
||||
yarn
|
||||
git submodule foreach "
|
||||
git checkout master && git pull ${upstream} master
|
||||
"
|
||||
`;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue