Skip to content

Commit

Permalink
feat(build): don't show prod warning in releases
Browse files Browse the repository at this point in the history
The production warning is snown in all builds (dev and prod; weekly and rc) and in all versions expect prod builds of releases.

To iterate: only prod builds with versions matching /^v\d+\.\d+\.\d+$/ don't have the production warning.

Closes #11366
  • Loading branch information
AleksueiR committed Jun 15, 2015
1 parent 21a2f2c commit 353bd31
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grunt/options/aliases.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports =
'htmlmin'
'htmllint'
'useMinAssets'
#'imagemin'
'imagemin'
'notify:min'
'tarball'
'nfp:dist'
Expand Down Expand Up @@ -199,5 +199,5 @@ module.exports =
# 'INTERNAL: Removes a not for production warning from the distribution package.'
'nfp:dist':
[
'replace:nfpDist'
'nfp:release'
]
10 changes: 10 additions & 0 deletions grunt/tasks/nfp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ module.exports = (grunt)->
'INTERNAL: Adds a production warning by creating an empty file with a corresponding name in the build folder.'
->
grunt.file.write 'build/NOT_FOR_PRODUCTION', 'use dist \'folder\' instead'
)

grunt.registerTask(
'nfp:release'
'INTERNAL: Removes a production warning from a release build. It\' left in weekly and rc builds.'
->
pkg = grunt.option 'pkg'

if pkg.core.version.match /^\d+\.\d+\.\d+$/
grunt.task.run 'replace:nfpDist'
)

0 comments on commit 353bd31

Please sign in to comment.