Skip to content

Commit

Permalink
fixup! Add the github:upload_assets task to attach files to realeses
Browse files Browse the repository at this point in the history
1.8 style hashrockets…
  • Loading branch information
elia committed Oct 21, 2013
1 parent 1f504b8 commit 56f54b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Rakefile
Expand Up @@ -9,14 +9,14 @@ namespace :github do
token_path = '.github_access_token'
File.exist?(token_path) or raise ArgumentError, "Please create a personal access token (https://github.com/settings/tokens/new) and paste it inside #{token_path.inspect}"
token = File.read(token_path).strip
client = Octokit::Client.new access_token: token
client = Octokit::Client.new :access_token => token
tag_name = ENV['TAG'] || raise(ArgumentError, 'missing the TAG env variable (e.g. TAG=v0.4.4)')
release = client.releases('opal/opal').find{|r| p(r.id); p(r).tag_name == tag_name}
release_url = "https://api.github.com/repos/opal/opal/releases/#{release.id}"
%w[opal opal-parser].each do |name|
client.upload_asset release_url, "build/#{name}.js", content_type: 'application/x-javascript'
client.upload_asset release_url, "build/#{name}.min.js", content_type: 'application/x-javascript'
client.upload_asset release_url, "build/#{name}.min.js.gz", content_type: 'application/octet-stream'
client.upload_asset release_url, "build/#{name}.js", :content_type => 'application/x-javascript'
client.upload_asset release_url, "build/#{name}.min.js", :content_type => 'application/x-javascript'
client.upload_asset release_url, "build/#{name}.min.js.gz", :content_type => 'application/octet-stream'
end
end
end
Expand Down

0 comments on commit 56f54b5

Please sign in to comment.