Sha256: 99eecd5e70f83ed2f76082caac8183c81ef9456cda24f4478c5b62dc564680e7

Contents?: true

Size: 563 Bytes

Versions: 3

Compression:

Stored size: 563 Bytes

Contents

# frozen_string_literal: true

require 'eufycam/version'
require 'semantic'

namespace :version do
  desc 'Print current version'
  task :current do
    puts Eufycam::VERSION
  end

  desc 'Increment version'
  task :increment do
    version = Semantic::Version.new(Eufycam::VERSION)
    path = File.expand_path(File.join('..', 'eufycam', 'version.rb'), __dir__)

    File.open(path, 'r+') do |file|
      contents = file.read
      contents.gsub!(Eufycam::VERSION, version.increment!(:minor).to_s)

      file.rewind
      file.write(contents)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eufycam-0.6.0 lib/tasks/version.rake
eufycam-0.5.0 lib/tasks/version.rake
eufycam-0.4.0 lib/tasks/version.rake