Sha256: a2978488adde9b1da3c87c6b15d56017f48b8c660a55768382c0a8d53f88efdb

Contents?: true

Size: 1.22 KB

Versions: 37

Compression:

Stored size: 1.22 KB

Contents

#!/usr/bin/env ruby

require 'octokit'
require_relative 'lib/s3_website/version'

version = S3Website::VERSION
unless ENV['S3_WEBSITE_RELEASE_KEY']
  puts "Set the S3_WEBSITE_RELEASE_KEY environmental variable. It should be your personal GitHub access token."
  puts "Go to https://github.com/settings/applications#personal-access-tokens."
  exit 1
end

def run(cmd)
  unless system(cmd)
    exit 1
  end
end

puts "Building s3_website.jar..."
jar_location = 'target/scala-2.11/s3_website.jar'
run "./sbt clean assembly"

# The bin s3_website uses the MD5 checksum to verify that the jar is not corrupted
jar_md5 = Digest::MD5.file(jar_location).hexdigest
File.write('resources/s3_website.jar.md5', jar_md5)

tag_name = "v#{version}"
run "git tag #{tag_name} && git push origin #{tag_name}"
run "git push"

run "rake build"

client = Octokit::Client.new(:login => 'laurilehmijoki', :password => ENV['S3_WEBSITE_RELEASE_KEY'])
release = client.create_release(
  'laurilehmijoki/s3_website',
  tag_name,
  :body => "See https://github.com/laurilehmijoki/s3_website/blob/master/changelog.md##{version.gsub('.', '')}"
)
puts "Uploading s3_website.jar..."
client.upload_asset(release[:url], jar_location)
run "gem push pkg/s3_website-#{version}.gem"

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
s3_website_revived-4.0.3 release
s3_website_revived-4.0.2 release
s3_website_revived-4.0.1 release
s3_website_revived-4.0.0 release
s3_website-3.4.0 release
s3_website-3.3.0 release
s3_website-3.2.0 release
s3_website-3.1.0 release
s3_website-3.0.0 release
s3_website-2.16.0 release
s3_website-2.15.1 release
s3_website-2.15.0 release
s3_website-2.14.3 release
s3_website-2.14.2 release
s3_website-2.14.1 release
s3_website-2.14.0 release
s3_website-2.13.0 release
s3_website-2.12.3 release
s3_website-2.12.2 release
s3_website-2.12.1 release