Permalink
Browse files

Improving CLI reporting with simple msgs.

  • Loading branch information...
1 parent df62786 commit ba33cb281a85513c891d7fcd0e9f920350b686ed @arboleya committed Dec 22, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 build/bumper.coffee
View
@@ -25,20 +25,20 @@ switch process.argv[2]
process.exit()
new_version = "#{major}.#{minor}.#{patch}"
-
-console.log version
-console.log new_version
+console.log "Updating version to #{new_version} in files:"
# updating README
filepath = path.join __dirname, "../README.md"
contents = fs.readFileSync filepath, 'utf-8'
search = />\sVersion\s[0-9]+.[0-9]+.[0-9]+/
replace = '> Version ' + new_version
fs.writeFileSync filepath, (contents.replace search, replace)
+console.log '• README.md'
# updating package.json
filepath = path.join __dirname, "../package.json"
contents = fs.readFileSync filepath, 'utf-8'
search = /"version":\s"[0-9]+.[0-9]+.[0-9]+"/
replace = "\"version\": \"#{new_version}\""
-fs.writeFileSync filepath, (contents.replace search, replace)
+fs.writeFileSync filepath, (contents.replace search, replace)
+console.log '• package.json'

0 comments on commit ba33cb2

Please sign in to comment.