From 05433d782847923f34f4057664a9d90cfbfcb1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Tue, 26 Aug 2025 12:29:09 -1000 Subject: [PATCH] Fix the prepare_release workflow File was not added in #114, and the prepare_release workflow depend on it. --- tasks/vox.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tasks/vox.rake diff --git a/tasks/vox.rake b/tasks/vox.rake new file mode 100644 index 000000000..63d800ce8 --- /dev/null +++ b/tasks/vox.rake @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +namespace :vox do + desc 'Update the version in preparation for a release' + task 'version:bump:full', [:version] do |_, args| + abort 'You must provide a tag.' if args[:version].nil? || args[:version].empty? + version = args[:version] + abort "#{version} does not appear to be a valid version string in x.y.z format" unless Gem::Version.correct?(version) + + puts "Setting version to #{version}" + + data = File.read('Rakefile') + new_data = data.sub(/OPENVOX_AGENT_VERSION = "[^"]+"/, %(OPENVOX_AGENT_VERSION = "#{version}")) + warn 'Failed to update version in lib/facter/version.rb' if data == new_data + + File.write('Rakefile', new_data) + end +end