Skip to content

Commit e35db97

Browse files
authored
Merge pull request #22 from tildeio/6.0.0-alpha
fix script
2 parents 5c62f8c + 22430cd commit e35db97

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/fetch_release.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ def initialize(checksum:, path:, platform:)
3333
def upload_github_asset(octokit, release)
3434
puts "uploading #{@path}..."
3535
asset = octokit.upload_asset(
36-
release.url,
37-
@path,
36+
release.url,
37+
@path,
3838
content_type: 'application/gzip',
39-
query: { label: artifact[:platform] }
39+
query: { label: @platform }
4040
)
4141
puts asset.url
4242
end
4343

4444
def upload_lambda_layer(aws)
45-
return unless lambda_arch = LAMBDA_PLATFORMS[@platform]
45+
return unless (lambda_arch = LAMBDA_PLATFORMS[@platform])
4646

4747
require 'zip'
4848
require 'rubygems/package'
@@ -58,11 +58,11 @@ def upload_lambda_layer(aws)
5858
FileUtils.mkdir_p(binary_dir)
5959

6060
# 1 - unarchive
61-
Gem::Package::new("").extract_tar_gz(File.open(@path, "rb"), binary_dir)
61+
Gem::Package.new('').extract_tar_gz(File.open(@path, 'rb'), binary_dir)
6262

63-
list = Dir[File.join(binary_dir, "*")]
63+
list = Dir[File.join(binary_dir, '*')]
6464

65-
if list != [File.join(binary_dir, "skylight")]
65+
if list != [File.join(binary_dir, 'skylight')]
6666
raise "expected to find one skylight binary but found #{list.inspect}"
6767
end
6868

@@ -133,7 +133,7 @@ def download_artifact(platform:, checksum:, version: VERSION, base_url: BASE_URL
133133
artifacts << download_artifact(platform: platform, checksum: checksum)
134134
end
135135

136-
LAMBDA_PLATFORMS = { "x86_64-linux" => "x86_64", "aarch64-linux" => "arm64" }.freeze
136+
LAMBDA_PLATFORMS = { 'x86_64-linux' => 'x86_64', 'aarch64-linux' => 'arm64' }.freeze
137137

138138
aws = Aws::Lambda::Client.new
139139
# do this first to get the ARNs
@@ -144,11 +144,11 @@ def download_artifact(platform:, checksum:, version: VERSION, base_url: BASE_URL
144144
octokit = Octokit::Client.new(access_token: TOKEN)
145145
puts 'creating release...'
146146
release = octokit.create_release(
147-
REPO,
147+
REPO,
148148
VERSION,
149-
name: "Skylight for OTLP #{VERSION}",
150-
target_commitish: 'main',
151-
draft: true,
149+
name: "Skylight for OTLP #{VERSION}",
150+
target_commitish: 'main',
151+
draft: true,
152152
prerelease: true,
153153
# TODO: better formatting
154154
body: artifacts.map(&:layer_version_arn).compact.join("\n")

0 commit comments

Comments
 (0)