Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 05433d7

Browse files
committed
Fix the prepare_release workflow
File was not added in #114, and the prepare_release workflow depend on it.
1 parent 6c99e98 commit 05433d7

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tasks/vox.rake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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

0 commit comments

Comments
 (0)