mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added fallback remote for grunt master
no issue - our docs do not tell the user to set up an `upstream` remote for Casper, so running `grunt master` will fail as it expects `upstream` to exist - this commit adds detection for if `upstream` exists, and falls back to `origin` if not
This commit is contained in:
parent
6d2dfff5b5
commit
2bdb9c5d0a
1 changed files with 10 additions and 5 deletions
15
Gruntfile.js
15
Gruntfile.js
|
@ -219,7 +219,7 @@ const configureGrunt = function (grunt) {
|
|||
const upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream';
|
||||
grunt.log.writeln('Pulling down the latest master from ' + upstream);
|
||||
return `
|
||||
git submodule sync
|
||||
git submodule sync && \
|
||||
git submodule update
|
||||
|
||||
if ! git diff --exit-code --quiet --ignore-submodules=untracked; then
|
||||
|
@ -227,11 +227,16 @@ const configureGrunt = function (grunt) {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
git checkout master
|
||||
git pull ${upstream} master
|
||||
yarn
|
||||
REMOTE=$(git remote | grep "${upstream}" > /dev/null && echo "${upstream}" || echo "origin")
|
||||
|
||||
git checkout master && \
|
||||
git pull $REMOTE master && \
|
||||
yarn && \
|
||||
git submodule foreach "
|
||||
git checkout master && git pull ${upstream} master
|
||||
git checkout master
|
||||
|
||||
REMOTE=$(git remote | grep "${upstream}" > /dev/null && echo "${upstream}" || echo "origin")
|
||||
git pull $REMOTE master
|
||||
"
|
||||
`;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue