WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9d48a58

Browse files
authored
Merge pull request #21192 from Homebrew/github_packages-type-fix
github_packages: cast `pkg_version` and `rebuild` to `Version` and `Integer`
2 parents bd1d29a + a3dabbe commit 9d48a58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Library/Homebrew/github_packages.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:)
8989
def self.version_rebuild(version, rebuild, bottle_tag = nil)
9090
bottle_tag = (".#{bottle_tag}" if bottle_tag.present?)
9191

92-
rebuild = if rebuild.to_i.positive?
92+
rebuild = if rebuild.positive?
9393
if bottle_tag
9494
".#{rebuild}"
9595
else
@@ -242,8 +242,8 @@ def preupload_check(user, token, skopeo, _formula_full_name, bottle_hash, keep_o
242242
_, org, repo, = *bottle_hash["bottle"]["root_url"].match(URL_REGEX)
243243
repo = "homebrew-#{repo}" unless repo.start_with?("homebrew-")
244244

245-
version = bottle_hash["formula"]["pkg_version"]
246-
rebuild = bottle_hash["bottle"]["rebuild"]
245+
version = Version.new(bottle_hash["formula"]["pkg_version"])
246+
rebuild = bottle_hash["bottle"]["rebuild"].to_i
247247
version_rebuild = GitHubPackages.version_rebuild(version, rebuild)
248248

249249
image_name = GitHubPackages.image_formula_name(formula_name)

0 commit comments

Comments
 (0)