@@ -268,9 +268,11 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
268
268
@info (" Building and deploying version $(build_version) to $(deploy_jll_repo) " )
269
269
# We need to make sure that the JLL repo at least exists, so that we can deploy binaries to it
270
270
# 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)
272
272
else
273
273
@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.
274
276
end
275
277
tag = " $(src_name) -v$(build_version) "
276
278
end
@@ -929,10 +931,11 @@ function get_github_author_login(repository, commit_hash; gh_auth=Wizard.github_
929
931
end
930
932
end
931
933
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;
934
936
gh_auth = Wizard. github_auth (;allow_anonymous= false ),
935
937
gh_username = gh_get_json (DEFAULT_API, " /user" ; auth= gh_auth)[" login" ])
938
+ url = " https://github.com/$(deploy_repo) "
936
939
try
937
940
# This throws if it does not exist
938
941
GitHub. repo (deploy_repo; auth= gh_auth)
@@ -942,7 +945,7 @@ function init_jll_package(name, code_dir, deploy_repo;
942
945
gh_org = dirname (deploy_repo)
943
946
isorg = GitHub. owner (gh_org; auth= gh_auth). typ == " Organization"
944
947
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 )" )
946
949
try
947
950
GitHub. create_repo (owner, basename (deploy_repo), Dict (" license_template" => " mit" , " has_issues" => " false" ); auth= gh_auth)
948
951
catch create_e
@@ -958,9 +961,9 @@ function init_jll_package(name, code_dir, deploy_repo;
958
961
959
962
if ! isdir (code_dir)
960
963
# 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) " )
962
965
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)
964
967
end
965
968
else
966
969
# Otherwise, hard-reset to latest main:
0 commit comments