Skip to content

Commit

Permalink
Removes version.rb from git
Browse files Browse the repository at this point in the history
  • Loading branch information
mscottford committed Sep 5, 2023
1 parent c02df0f commit b5b99b3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
14 changes: 10 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ RuboCop::RakeTask.new
namespace :version do
desc "Persist the the current version number as #{GVB.version}"
task :persist do
# open version file and replace contents of VERSION constant with the result of calling `GVB.version`
version_file = File.expand_path(File.join(File.dirname(__FILE__), 'lib', 'corgibytes', 'freshli', 'commons', 'version.rb'))
version_file_contents = File.read(version_file)
new_version_file_contents = version_file_contents.gsub(/VERSION = ".*"/, "VERSION = \"#{GVB.version}\"")
File.write(version_file, new_version_file_contents)
version_file_contents = <<~VERSION_FILE
module Corgibytes
module Freshli
module Commons
VERSION = '#{GVB.version}'
end
end
end
VERSION_FILE
File.write(version_file, version_file_contents)
end
end

Expand Down
12 changes: 11 additions & 1 deletion freshli-commons.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# frozen_string_literal: true

require_relative 'lib/corgibytes/freshli/commons/version'
begin
require_relative 'lib/corgibytes/freshli/commons/version'
rescue LoadError
module ::Corgibytes
module Freshli
module Commons
VERSION = '0.0.0'
end
end
end
end

Gem::Specification.new do |spec|
spec.name = 'freshli-commons'
Expand Down
9 changes: 0 additions & 9 deletions lib/corgibytes/freshli/commons/version.rb

This file was deleted.

0 comments on commit b5b99b3

Please sign in to comment.