Fixed grunt master to work with submodules correctly (#10566)

refs #9441

`grunt master` should only error if there are changes to tracked files which have not been committed - this ensures no work is lost.
This commit is contained in:
Fabien O'Carroll 2019-03-06 09:03:01 +01:00 committed by GitHub
parent 4fc6b11d79
commit 52ad2711b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -215,7 +215,10 @@ const configureGrunt = function (grunt) {
var upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream';
grunt.log.writeln('Pulling down the latest master from ' + upstream);
return `
if ! git diff --exit-code --quiet; then
git submodule sync
git submodule update
if ! git diff --exit-code --quiet --ignore-submodules=untracked; then
echo "Working directory is not clean, do you have uncommited changes? Please commit, stash or discard changes to continue."
exit 1
fi