Skip to content

Instantly share code, notes, and snippets.

@dgmike
Created November 20, 2016 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgmike/133f8cb8cb12fc3b0164bb4baeea6025 to your computer and use it in GitHub Desktop.
Save dgmike/133f8cb8cb12fc3b0164bb4baeea6025 to your computer and use it in GitHub Desktop.
require 'json'
package = JSON.parse(File.read 'package.json')
version = `stepup version --next-release`.strip
package['version'] = version
puts JSON.generate package, indent: " ", space: " ", object_nl: "\n", array_nl: "\n", max_nesting: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment