Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoBuild] Disallow prerelease numbers in versions of JLLs #1223

Merged
merged 2 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/AutoBuild.jl
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,8 @@ function autobuild(dir::AbstractString,
end

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

# We must prepare our sources. Download them, hash them, etc...
Expand Down
12 changes: 11 additions & 1 deletion test/building.jl
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ end
)
end

# Test that manually specifying a build number in our src_version is an error()
# Test that manually specifying prerelease or build number in our src_version is an error()
@test_throws ErrorException autobuild(
build_path,
"badopenssl",
Expand All @@ -302,6 +302,16 @@ end
Product[],
Dependency[],
)
@test_throws ErrorException autobuild(
build_path,
"test",
v"1.2.3-4",
GitSource[],
"true",
[HostPlatform()],
Product[],
Dependency[],
)
end

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