mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +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: {
|
||||
command: 'yarn lint'
|
||||
},
|
||||
master: {
|
||||
main: {
|
||||
command: function () {
|
||||
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 `
|
||||
git submodule sync && \
|
||||
git submodule update
|
||||
@ -227,22 +227,22 @@ const configureGrunt = function (grunt) {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout master
|
||||
git checkout main
|
||||
|
||||
if git config remote.${upstream}.url > /dev/null; then
|
||||
git pull ${upstream} master
|
||||
git pull ${upstream} main
|
||||
else
|
||||
git pull origin master
|
||||
git pull origin main
|
||||
fi
|
||||
|
||||
yarn && \
|
||||
git submodule foreach "
|
||||
git checkout master
|
||||
git checkout main
|
||||
|
||||
if git config remote.${upstream}.url > /dev/null; then
|
||||
git pull ${upstream} master
|
||||
git pull ${upstream} main
|
||||
else
|
||||
git pull origin master
|
||||
git pull origin main
|
||||
fi
|
||||
"
|
||||
`;
|
||||
@ -571,17 +571,19 @@ const configureGrunt = function (grunt) {
|
||||
}
|
||||
});
|
||||
|
||||
// ### grunt master
|
||||
// This command helps you to bring your working directory back to current master.
|
||||
// It will also update your dependencies to master and shows you if your database is healthy.
|
||||
// ### grunt main
|
||||
// This command helps you to bring your working directory back to current main.
|
||||
// It will also update your dependencies to main and shows you if your database is healthy.
|
||||
// It won't build the client!
|
||||
//
|
||||
// `grunt master` [`upstream` is the default upstream to pull from]
|
||||
// `grunt master --upstream=parent`
|
||||
grunt.registerTask('master', 'Update your current working folder to latest master.',
|
||||
['shell:master', 'subgrunt:init']
|
||||
// `grunt main` [`upstream` is the default upstream to pull from]
|
||||
// `grunt main --upstream=parent`
|
||||
grunt.registerTask('main', 'Update your current working folder to latest main.',
|
||||
['shell:main', 'subgrunt:init']
|
||||
);
|
||||
|
||||
grunt.registerTask('master', 'Backwards compatible alias for `grunt main`.', 'main');
|
||||
|
||||
// ### Release
|
||||
// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user