Sha256: f103c6ec2f6dc2660783db21127eed30cf130e9b0fd076850d57b408d0e04271
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
#!/usr/bin/env ruby gem_name = 'omniauth-burner' def execute(cmd) puts "\n***************************************************************************\n" puts "$ #{cmd}" system(cmd) end def version_file_path './lib/omniauth/burner/version.rb' end def version_file @version_file ||= File.read(version_file_path) end def version @version ||= version_file.match(/VERSION\s*=\s*'([^']*)'/)[1] end def increment_version parts = version.split('.') parts[2] = (parts[2].to_i + 1).to_s new_version = parts.join('.') version_file.gsub!(version, new_version) File.open(version_file_path, 'w') do |file| file.write(version_file) end @version_file = nil @version = nil end puts "\nBuilding omniauth-burner-#{version}.gem..." if ARGV.include?('release') execute('git checkout master') execute('git merge develop') execute('git push') end execute('bundle exec rspec') execute("gem build #{gem_name}.gemspec") execute("gem install #{gem_name}-#{version}.gem --no-ri --no-rdoc") if ARGV.include?('release') execute("git tag #{version}") execute('git push --tags') execute("gem push #{gem_name}-#{version}.gem") execute('git checkout develop') increment_version execute("git add #{version_file_path}") execute("git commit -m 'Updated version to #{version}'") execute('git push') end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-burner-1.0.1 | deploy |