Skip to content

Commit

Permalink
release with grunt-prompt instead of storing sensitive information in…
Browse files Browse the repository at this point in the history
… plaintext
  • Loading branch information
paulcpederson committed Mar 18, 2015
1 parent a0db600 commit ead8ba0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
29 changes: 21 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
// └─────────────┘
// Grunt wraps several tasks to ease development
// runs acetate, deploys the site, and tags new releases

// To draft a release, add GitHub credentials to user.js
var fs = require('fs');
var user = function(){};

if (fs.existsSync('./user.js')) {
user = require('./user.js');
}

// Gets current version description from CHANGELOG.md
function findVersion(log) {
Expand Down Expand Up @@ -175,7 +168,6 @@ module.exports = function(grunt) {
'github-release': {
options: {
repository: repo,
auth: user(),
release: {
tag_name: currentVersion,
name: currentVersion,
Expand All @@ -187,6 +179,26 @@ module.exports = function(grunt) {
}
},

// Ask for GitHub username and password
'prompt': {
github: {
options: {
questions: [
{
config: 'github-release.options.auth.user',
type: 'input',
message: 'GitHub username:'
},
{
config: 'github-release.options.auth.password',
type: 'password',
message: 'GitHub password:'
}
]
}
}
},

// Deploy the docs site to gh-pages
'gh-pages': {
options: {
Expand All @@ -207,6 +219,7 @@ module.exports = function(grunt) {

// Release a new version of the framework
grunt.registerTask('release', [
'prompt:github',
'prepublish',
'compress',
'github-release'
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@
"acetate": "0.0.7",
"grunt": "~0.4.5",
"grunt-acetate": "0.0.5",
"grunt-contrib-imagemin": "^0.8.1",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-compress": "^0.11.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-imagemin": "^0.8.1",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-compress": "^0.11.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-gh-pages": "^0.9.1",
"grunt-github-releaser": "^0.1.17",
"grunt-newer": "^0.7.0",
"grunt-prompt": "^1.3.0",
"load-grunt-tasks": "~0.6.0",
"minimist": "~1.1.0",
"grunt-concurrent": "^0.5.0",
"grunt-github-releaser": "^0.1.17"
"minimist": "~1.1.0"
}
}

0 comments on commit ead8ba0

Please sign in to comment.