Skip to content

Commit

Permalink
Prefer to use version constant for release management.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 24, 2023
1 parent 599f768 commit f3a2799
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 29 deletions.
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem 'git-version-bump', '~> 0.15'
gem 'github-release', '~> 0.1'
gemspec

gem 'i18n', '~> 0.6', '>= 0.6.8'
gem 'json', '~> 2.0'
gem 'mime-types', '~> 3.0'
Expand All @@ -21,4 +21,7 @@ gem 'timecop', '~> 0.9'
# Needed to have passing tests on Ruby 2.7, Ruby 3.0
gem 'cgi', '>= 0.3.6' if RUBY_VERSION >= '2.7.0' && RUBY_VERSION <= '3.1.0'

gemspec
group :maintenance, optional: true do
gem "bake"
gem "bake-gem"
end
19 changes: 0 additions & 19 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# frozen_string_literal: true
# -*-ruby-*-
exec(*(["bundle", "exec", $PROGRAM_NAME] + ARGV)) if ENV['BUNDLE_GEMFILE'].nil?

begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => ex
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end

require 'rdoc/task'
require 'rake/testtask'
Expand All @@ -33,12 +23,3 @@ RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/rack/*.rb')
rdoc.rdoc_files.include('lib/rack/*/*.rb')
end


# PACKAGING =================================================================

Bundler::GemHelper.install_tasks

task :release do
sh "git release"
end
5 changes: 5 additions & 0 deletions lib/rack/contrib/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Rack
module Contrib
VERSION = '2.3.0'
end
end
9 changes: 2 additions & 7 deletions rack-contrib.gemspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# frozen_string_literal: true

begin
require 'git-version-bump'
rescue LoadError
nil
end
require_relative 'lib/rack/contrib/version'

Gem::Specification.new do |s|
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=

s.name = 'rack-contrib'
s.version = GVB.version rescue "0.0.0.1.ENOTAG"
s.date = GVB.date rescue Time.now.strftime("%F")
s.version = Rack::Contrib::VERSION

s.licenses = ['MIT']

Expand Down

0 comments on commit f3a2799

Please sign in to comment.