0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

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

View file

@ -215,7 +215,10 @@ const configureGrunt = function (grunt) {
var upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream'; var upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream';
grunt.log.writeln('Pulling down the latest master from ' + upstream); grunt.log.writeln('Pulling down the latest master from ' + upstream);
return ` 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." echo "Working directory is not clean, do you have uncommited changes? Please commit, stash or discard changes to continue."
exit 1 exit 1
fi fi