Skip to content

Commit e7a28da

Browse files
authored
[AutoBuild] Remove unused argument from init_jll_package (#1151)
1 parent 4d263be commit e7a28da

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilder"
22
uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
33
authors = ["Elliot Saba <staticfloat@gmail.com>"]
4-
version = "0.4.7"
4+
version = "0.4.8"
55

66
[deps]
77
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"

src/AutoBuild.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
268268
@info("Building and deploying version $(build_version) to $(deploy_jll_repo)")
269269
# We need to make sure that the JLL repo at least exists, so that we can deploy binaries to it
270270
# even if we're not planning to register things to it today.
271-
init_jll_package(src_name, code_dir, deploy_jll_repo)
271+
init_jll_package(code_dir, deploy_jll_repo)
272272
else
273273
@info("Building and deploying version $(build_version) to $(code_dir)")
274+
# XXX: should we intialize the git repository here? The problem is that if we
275+
# don't clone for the remote we end up with a diverging history.
274276
end
275277
tag = "$(src_name)-v$(build_version)"
276278
end
@@ -929,10 +931,11 @@ function get_github_author_login(repository, commit_hash; gh_auth=Wizard.github_
929931
end
930932
end
931933

932-
933-
function init_jll_package(name, code_dir, deploy_repo;
934+
# Init remote repository, and its local counterpart
935+
function init_jll_package(code_dir, deploy_repo;
934936
gh_auth = Wizard.github_auth(;allow_anonymous=false),
935937
gh_username = gh_get_json(DEFAULT_API, "/user"; auth=gh_auth)["login"])
938+
url = "https://github.com/$(deploy_repo)"
936939
try
937940
# This throws if it does not exist
938941
GitHub.repo(deploy_repo; auth=gh_auth)
@@ -942,7 +945,7 @@ function init_jll_package(name, code_dir, deploy_repo;
942945
gh_org = dirname(deploy_repo)
943946
isorg = GitHub.owner(gh_org; auth=gh_auth).typ == "Organization"
944947
owner = GitHub.Owner(gh_org, isorg)
945-
@info("Creating new wrapper code repo at https://github.com/$(deploy_repo)")
948+
@info("Creating new wrapper code repo at $(url)")
946949
try
947950
GitHub.create_repo(owner, basename(deploy_repo), Dict("license_template" => "mit", "has_issues" => "false"); auth=gh_auth)
948951
catch create_e
@@ -958,9 +961,9 @@ function init_jll_package(name, code_dir, deploy_repo;
958961

959962
if !isdir(code_dir)
960963
# If it does exist, clone it down:
961-
@info("Cloning wrapper code repo from https://github.com/$(deploy_repo) into $(code_dir)")
964+
@info("Cloning wrapper code repo from $(url) into $(code_dir)")
962965
Wizard.with_gitcreds(gh_username, gh_auth.token) do creds
963-
LibGit2.clone("https://github.com/$(deploy_repo)", code_dir; credentials=creds)
966+
LibGit2.clone(url, code_dir; credentials=creds)
964967
end
965968
else
966969
# Otherwise, hard-reset to latest main:

0 commit comments

Comments
 (0)