Skip to content

Commit

Permalink
🛠 ✨ grunt master (#8251)
Browse files Browse the repository at this point in the history
refs #8235

- add a new grunt command `dev-master`
- this command will bring back your working directory to latest master
- plus it will update your dependencies and checks your database health
- it won't build the client (!)

* 🛠  ✨  grunt dev-master
* fix jscs 💣
* change to grunt master
  • Loading branch information
kirrg001 authored and ErisDS committed Apr 5, 2017
1 parent 587ff6f commit 13fb0c6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,21 @@ var overrides = require('./core/server/overrides'),
}
},

// ### grunt-shell
// Command line tools where it's easier to run a command directly than configure a grunt plugin
shell: {
master: {
command: function () {
var upstream = grunt.option('upstream') || 'origin';
return 'git checkout master; git pull ' + upstream + ' master; npm install;';
}
},

dbhealth: {
command: 'knex-migrator health'
}
},

// ### grunt-docker
// Generate documentation from code
docker: {
Expand Down Expand Up @@ -670,6 +685,18 @@ var overrides = require('./core/server/overrides'),
}
});

/**
* This command helps you to bring your working directory back to current master.
* It will also update your dependencies and shows you if your database is health.
* It won't build the client!
*
* grunt master [origin is the default upstream to pull from]
* grunt master --upstream=parent
*/
grunt.registerTask('master', 'Update your current working folder to latest master.',
['shell:master', 'update_submodules', 'subgrunt:init', 'shell:dbhealth']
);

// ### 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.
Expand Down

0 comments on commit 13fb0c6

Please sign in to comment.