Skip to content

Commit c3ab910

Browse files
[AutoBuild] Disallow prerelease numbers in versions of JLLs (#1223)
* [AutoBuild] Disallow prerelease numbers in versions of JLLs As a matter of fact Pkg doesn't like them, I think it's better to automatically error our instead of having to tell users that they shouldn't use them. * Update AutoBuild.jl Co-authored-by: Elliot Saba <[email protected]>
1 parent 1f824af commit c3ab910

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/AutoBuild.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,8 @@ function autobuild(dir::AbstractString,
755755
end
756756

757757
# If the user passed in a src_version with a build number, bail out
758-
if src_version.build != ()
759-
error("Will not build with a `src_version` that has a build number already specified!")
758+
if any(!isempty, (src_version.prerelease, src_version.build))
759+
error("Will not build with a `src_version` that does not have the format `major.minor.patch`! Do not set prerelease or build numbers.")
760760
end
761761

762762
# We must prepare our sources. Download them, hash them, etc...

test/building.jl

+11-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ end
291291
)
292292
end
293293

294-
# Test that manually specifying a build number in our src_version is an error()
294+
# Test that manually specifying prerelease or build number in our src_version is an error()
295295
@test_throws ErrorException autobuild(
296296
build_path,
297297
"badopenssl",
@@ -302,6 +302,16 @@ end
302302
Product[],
303303
Dependency[],
304304
)
305+
@test_throws ErrorException autobuild(
306+
build_path,
307+
"test",
308+
v"1.2.3-4",
309+
GitSource[],
310+
"true",
311+
[HostPlatform()],
312+
Product[],
313+
Dependency[],
314+
)
305315
end
306316

307317
@test_throws ErrorException build_tarballs(String[], "", v"1.0", GitSource[], "", supported_platforms(; experimental=true), LibraryProduct[], Dependency[])

0 commit comments

Comments
 (0)