From a6895588962af1e2e401365bd28470d1bb775c85 Mon Sep 17 00:00:00 2001 From: Jarrett Widman Date: Wed, 10 Feb 2016 17:06:09 -0600 Subject: [PATCH 1/2] svg_sprite build fixes, use newer protractor-coverage --- grunt/aliases.yaml | 1 + grunt/jshint.js | 4 ++-- grunt/svg_sprite.js | 4 +++- package.json | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/grunt/aliases.yaml b/grunt/aliases.yaml index aae3d41..d14256d 100644 --- a/grunt/aliases.yaml +++ b/grunt/aliases.yaml @@ -7,6 +7,7 @@ build: - less - ngtemplates - copy + - svg_sprite - browserify:build pretest: diff --git a/grunt/jshint.js b/grunt/jshint.js index 6a93c28..cdb3f52 100644 --- a/grunt/jshint.js +++ b/grunt/jshint.js @@ -1,7 +1,7 @@ +"use strict"; + module.exports = function () { - "use strict"; - return { dev: { options: { diff --git a/grunt/svg_sprite.js b/grunt/svg_sprite.js index 8759e8c..7379d70 100644 --- a/grunt/svg_sprite.js +++ b/grunt/svg_sprite.js @@ -1,3 +1,5 @@ +"use strict"; + module.exports = { css: { expand: true, @@ -33,8 +35,8 @@ module.exports = { options: { mode: { + inline: true, symbol: { - inline: true, sprite: "sprite.svg" } } diff --git a/package.json b/package.json index c1fad65..af0db33 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "grunt-localstack": "^1.0.0", "grunt-newer": "^1.1.1", "grunt-postcss": "^0.7.1", - "grunt-protractor-coverage": "^0.2.15", - "grunt-svg-sprite": "^1.2.15", + "grunt-protractor-coverage": "github:mdasberg/grunt-protractor-coverage#ef6a8fb", + "grunt-svg-sprite": "github:vokal/grunt-svg-sprite.git#8200979a0e", "grunt-svgmin": "^3.1.0", "grunt-truecolors-less": "1.0.x", "jasmine-bail-fast": "0.0.1", From f5c6713792249192a6faa49c4194e4ef94d2ccb3 Mon Sep 17 00:00:00 2001 From: Jarrett Widman Date: Wed, 10 Feb 2016 17:11:09 -0600 Subject: [PATCH 2/2] include package name in slack notifications --- CHANGELOG.md | 6 ++++++ grunt/notification.js | 8 +++++--- grunt/notification_slack.js | 6 ++++-- package.json | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ad3ce..6099093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Changelog + +#### 6.1.1 Bug Fixes, Dep Updates + +- Fixes svg_sprite task, updates peer dep as well +- Includes package name in email and Slack notifications + #### 6.1.0 Add Slack channel notifications This is not included in deployment by default in this release, so to use, after deployment runs: diff --git a/grunt/notification.js b/grunt/notification.js index df52382..67f7d26 100644 --- a/grunt/notification.js +++ b/grunt/notification.js @@ -6,7 +6,9 @@ module.exports = function ( grunt ) { var envConfig = grunt.config( "env" ); var deployVersion = grunt.config( "version" ); - var pkgVersion = grunt.file.readJSON( "package.json" ).version || ""; + var pkg = grunt.file.readJSON( "package.json" ); + var pkgVersion = pkg.version || ""; + var pkgName = pkg.name || "App"; grunt.registerTask( "notification", "Notify an email that a deployment is going out", function () { @@ -36,13 +38,13 @@ module.exports = function ( grunt ) Message: { Body: { Html: { - Data: "

Version " + pkgVersion + " @" + deployVersion + "

" + Data: "

" + pkgName + " build " + pkgVersion + " @" + deployVersion + "

" + '

A new build for ' + host + " " + "should be available in about 10 minutes.

" } }, Subject: { - Data: "New build for " + host + " @" + deployVersion + Data: pkgName + " build for " + host + " @" + deployVersion } }, Source: emailFrom diff --git a/grunt/notification_slack.js b/grunt/notification_slack.js index fd7dac9..231ea03 100644 --- a/grunt/notification_slack.js +++ b/grunt/notification_slack.js @@ -7,7 +7,9 @@ module.exports = function ( grunt ) var envConfig = grunt.config( "env" ); var slackApiToken = grunt.config( "slackApiToken" ); var deployVersion = grunt.config( "version" ); - var pkgVersion = grunt.file.readJSON( "package.json" ).version || ""; + var pkg = grunt.file.readJSON( "package.json" ); + var pkgVersion = pkg.version || ""; + var pkgName = pkg.name || "App"; grunt.registerTask( "notification_slack", "Notify a Slack channel that a deployment is going out", function () { @@ -26,7 +28,7 @@ module.exports = function ( grunt ) var slacker = new Slack( slackApiToken ); slacker.api( "chat.postMessage", { - text: "Build " + pkgVersion + " @" + deployVersion + " for " + host + text: pkgName + " build " + pkgVersion + " @" + deployVersion + " for " + host + " should be available in about 10 minutes.", channel: slackChannel, username: "Release Bot" diff --git a/package.json b/package.json index af0db33..07fe0c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dominatr-grunt", - "version": "6.1.0", + "version": "6.1.1", "description": "Build all the things!", "scripts": { "test": ""