Skip to content

Commit 792fb32

Browse files
authored
[AutoBuild] Improve check on Julia version for experimental platforms (#1066)
1 parent e64e4fc commit 792fb32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AutoBuild.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import LibGit2
77
import PkgLicenses
88

99
const DEFAULT_JULIA_VERSION_SPEC = "1.0"
10+
const PKG_VERSIONS = Base.VERSION >= v"1.7-" ? Pkg.Versions : Pkg.Types
1011

1112
const BUILD_HELP = (
1213
"""
@@ -124,7 +125,7 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
124125
end
125126

126127
# Throw an error if we're going to build for platforms not supported by Julia v1.5-.
127-
if any(p -> arch(p) == "armv6l" || (Sys.isapple(p) && arch(p) == "aarch64"), platforms) && !occursin(r"1\.[67]", julia_compat)
128+
if any(p -> arch(p) == "armv6l" || (Sys.isapple(p) && arch(p) == "aarch64"), platforms) && minimum(VersionNumber(rng.lower.t) for rng in PKG_VERSIONS.semver_spec(julia_compat).ranges) < v"1.6"
128129
error("Experimental platforms cannot be used with Julia v1.5-.\nChange `julia_compat` to require at least Julia v1.6")
129130
end
130131

0 commit comments

Comments
 (0)