Sha256: 85106a451a59277d6425a88493a70044f18caa48084cb5ac7cf6c2e4bf66899e

Contents?: true

Size: 1.67 KB

Versions: 30

Compression:

Stored size: 1.67 KB

Contents

module Souls
  module Release
    class << self
      def return_method
        system("gem install souls")
        sleep(3)
        current_souls_ver = Souls::VERSION.strip.split(".").map(&:to_i)
        prompt = TTY::Prompt.new
        choices = [
          "1. Patch(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'patch')})",
          "2. Minor(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'minor')})",
          "3. Major(#{Souls.version_detector(current_ver: current_souls_ver, update_kind: 'major')})"
        ]
        choice_num = prompt.select("Select Version: ", choices)[0].to_i
        update_kinds = %w[patch minor major]
        update_kind = update_kinds[choice_num - 1]
        souls_new_ver = Souls.version_detector(current_ver: current_souls_ver, update_kind: update_kind)
        status = Paint["Saving Repo...", :yellow]
        Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
          Whirly.status = status
          %w[api worker].each do |s_name|
            Souls.update_service_gemfile(service_name: s_name, version: souls_new_ver)
            result = Paint[Souls.update_repo(service_name: s_name, update_kind: update_kind), :green]
            Whirly.status = result
          end
          Souls.overwrite_version(new_version: souls_new_ver)
          puts("before add")
          system("git add .")
          puts("before commit")
          system("git commit -m 'souls update v#{souls_new_ver}'")
          puts("before build")
          system("rake build")
          system("rake release")
          Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
souls-0.29.3 lib/souls/release/methods.rb
souls-0.29.2 lib/souls/release/methods.rb
souls-0.29.1 lib/souls/release/methods.rb
souls-0.29.0 lib/souls/release/methods.rb
souls-0.28.12 lib/souls/release/methods.rb
souls-0.28.11 lib/souls/release/methods.rb
souls-0.28.10 lib/souls/release/methods.rb
souls-0.28.9 lib/souls/release/methods.rb
souls-0.28.8 lib/souls/release/methods.rb
souls-0.28.7 lib/souls/release/methods.rb
souls-0.28.6 lib/souls/release/methods.rb
souls-0.28.5 lib/souls/release/methods.rb
souls-0.28.4 lib/souls/release/methods.rb
souls-0.28.3 lib/souls/release/methods.rb
souls-0.28.2 lib/souls/release/methods.rb
souls-0.28.1 lib/souls/release/methods.rb
souls-0.28.0 lib/souls/release/methods.rb
souls-0.27.8 lib/souls/release/methods.rb
souls-0.27.7 lib/souls/release/methods.rb
souls-0.27.6 lib/souls/release/methods.rb