This repository was archived by the owner on Sep 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ namespace :vox do
4+ desc 'Update the version in preparation for a release'
5+ task 'version:bump:full' , [ :version ] do |_ , args |
6+ abort 'You must provide a tag.' if args [ :version ] . nil? || args [ :version ] . empty?
7+ version = args [ :version ]
8+ abort "#{ version } does not appear to be a valid version string in x.y.z format" unless Gem ::Version . correct? ( version )
9+
10+ puts "Setting version to #{ version } "
11+
12+ data = File . read ( 'Rakefile' )
13+ new_data = data . sub ( /OPENVOX_AGENT_VERSION = "[^"]+"/ , %(OPENVOX_AGENT_VERSION = "#{ version } ") )
14+ warn 'Failed to update version in lib/facter/version.rb' if data == new_data
15+
16+ File . write ( 'Rakefile' , new_data )
17+ end
18+ end
You can’t perform that action at this time.
0 commit comments