Sha256: 6f071573d2f20a1bcd95c48c78e3135a2fa9c62ac6e4f1e91f3ecd6da51c2031
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
#!/usr/bin/env ruby gem_name = 'omniauth-acton' def execute(cmd) puts "\n***************************************************************************\n" puts "$ #{cmd}" system(cmd) end def version_file_path './lib/omniauth/acton/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-acton-#{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-acton-1.0.1 | deploy |