mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
Updated grunt master
to be an alias of grunt main
- switches all code references to `main` but keeps `master` as an alias
This commit is contained in:
parent
a2d97de09a
commit
5405e6adc0
32
Gruntfile.js
32
Gruntfile.js
@ -214,10 +214,10 @@ const configureGrunt = function (grunt) {
|
|||||||
lint: {
|
lint: {
|
||||||
command: 'yarn lint'
|
command: 'yarn lint'
|
||||||
},
|
},
|
||||||
master: {
|
main: {
|
||||||
command: function () {
|
command: function () {
|
||||||
const upstream = grunt.option('upstream') || process.env.GHOST_UPSTREAM || 'upstream';
|
const 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 main from ' + upstream);
|
||||||
return `
|
return `
|
||||||
git submodule sync && \
|
git submodule sync && \
|
||||||
git submodule update
|
git submodule update
|
||||||
@ -227,22 +227,22 @@ const configureGrunt = function (grunt) {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git checkout master
|
git checkout main
|
||||||
|
|
||||||
if git config remote.${upstream}.url > /dev/null; then
|
if git config remote.${upstream}.url > /dev/null; then
|
||||||
git pull ${upstream} master
|
git pull ${upstream} main
|
||||||
else
|
else
|
||||||
git pull origin master
|
git pull origin main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
yarn && \
|
yarn && \
|
||||||
git submodule foreach "
|
git submodule foreach "
|
||||||
git checkout master
|
git checkout main
|
||||||
|
|
||||||
if git config remote.${upstream}.url > /dev/null; then
|
if git config remote.${upstream}.url > /dev/null; then
|
||||||
git pull ${upstream} master
|
git pull ${upstream} main
|
||||||
else
|
else
|
||||||
git pull origin master
|
git pull origin main
|
||||||
fi
|
fi
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
@ -571,17 +571,19 @@ const configureGrunt = function (grunt) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// ### grunt master
|
// ### grunt main
|
||||||
// This command helps you to bring your working directory back to current master.
|
// This command helps you to bring your working directory back to current main.
|
||||||
// It will also update your dependencies to master and shows you if your database is healthy.
|
// It will also update your dependencies to main and shows you if your database is healthy.
|
||||||
// It won't build the client!
|
// It won't build the client!
|
||||||
//
|
//
|
||||||
// `grunt master` [`upstream` is the default upstream to pull from]
|
// `grunt main` [`upstream` is the default upstream to pull from]
|
||||||
// `grunt master --upstream=parent`
|
// `grunt main --upstream=parent`
|
||||||
grunt.registerTask('master', 'Update your current working folder to latest master.',
|
grunt.registerTask('main', 'Update your current working folder to latest main.',
|
||||||
['shell:master', 'subgrunt:init']
|
['shell:main', 'subgrunt:init']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
grunt.registerTask('master', 'Backwards compatible alias for `grunt main`.', 'main');
|
||||||
|
|
||||||
// ### Release
|
// ### Release
|
||||||
// Run `grunt release` to create a Ghost release zip file.
|
// Run `grunt release` to create a Ghost release zip file.
|
||||||
// Uses the files specified by `.npmignore` to know what should and should not be included.
|
// Uses the files specified by `.npmignore` to know what should and should not be included.
|
||||||
|
Loading…
Reference in New Issue
Block a user