Skip to content

Commit 8de7feb

Browse files
committed
Backward compatible keyword syntax and Wrap new code in VERSION > 1.5
1 parent 30933ee commit 8de7feb

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

action.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ runs:
2828
shell: bash
2929
- run: |
3030
import Pkg
31-
VERSION >= v"1.5-" && Pkg.Registry.add("General")
32-
33-
# If provided add local registries
34-
if !isempty("${{ inputs.localregistry }}")
35-
local_repos = split("${{ inputs.localregistry }}", " ") .|> string
36-
for url in local_repos
37-
Pkg.Registry.add(Pkg.RegistrySpec(; url))
38-
end
31+
if VERSION >= v"1.5-"
32+
Pkg.Registry.add("General")
33+
34+
# If provided add local registries
35+
if !isempty("${{ inputs.localregistry }}")
36+
local_repos = split("${{ inputs.localregistry }}", " ") .|> string
37+
for repo_url in local_repos
38+
Pkg.Registry.add(Pkg.RegistrySpec(; url = repo_url))
39+
end
40+
end
3941
end
4042
4143
VERSION >= v"1.1.0-rc1" ? retry(Pkg.build)(verbose=true) : retry(Pkg.build)()

0 commit comments

Comments
 (0)