Sha256: d8c0ba3ba015540b97ef69b8a0054b6f9e3ee9e6280576dcbca24c2d1fa3228c

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'optparse'
require 'app_store_connect/jwt/version'

OPTIONS = {
  hosts: [],
  version: AppStoreConnect::JWT::VERSION
}

HOSTS = {
  rubygems: 'https://rubygems.org',
  github: 'https://rubygems.pkg.github.com/kyledecot'
}.freeze

OptionParser.new do |parser|
  HOSTS.keys.each do |key|
    parser.on("--#{key}") do
      OPTIONS[:hosts] << key
    end
  end

  parser.on('--version VERSION') do |version|
    OPTIONS[:version] = version
  end

  parser.on('--help', '-h') do
    puts parser
    exit(0)
  end
end.parse!

OPTIONS[:hosts].each do |key|
  ENV['RUBYGEMS_HOST'] = HOSTS.fetch(key)

  system "gem push -k #{key} app_store_connect_jwt-#{OPTIONS[:version]}.gem"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
app_store_connect_jwt-0.5.0 bin/publish
app_store_connect_jwt-0.4.0 bin/publish