Sha256: 33eae8e3758e9965d5db9fa1861dd5fe454e05cab17e38da5590fa5b0f0ffe36
Contents?: true
Size: 653 Bytes
Versions: 4
Compression:
Stored size: 653 Bytes
Contents
# frozen_string_literal: true require 'app_store_dev_api/version' require 'semantic' namespace :version do desc 'Print current version' task :current do puts AppStoreDevApi::VERSION end desc 'Increment version' task :increment do version = Semantic::Version.new(AppStoreDevApi::VERSION) path = File.expand_path(File.join('..', 'app_store_dev_api', 'version.rb'), __dir__) new_version = version.increment!(:minor).to_s File.open(path, 'r+') do |file| contents = file.read contents.gsub!(AppStoreDevApi::VERSION, new_version) file.rewind file.write(contents) new_version end end end
Version data entries
4 entries across 4 versions & 1 rubygems