Skip to content

Commit 50c4e67

Browse files
committed
rc docs: strip extra pre-release info, deploy to e.g. 1.5.0-rc2 instead of 1.5.0-rc2.0
1 parent f130d9b commit 50c4e67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/make.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ struct BuildBotConfig <: Documenter.DeployConfig end
221221
function Documenter.deploy_folder(::BuildBotConfig; devurl, kwargs...)
222222
haskey(ENV, "DOCUMENTER_KEY") || return nothing
223223
if Base.GIT_VERSION_INFO.tagged_commit
224-
return "v$(Base.VERSION)"
224+
# Strip extra pre-release info (1.5.0-rc2.0 -> 1.5.0-rc2)
225+
ver = VersionNumber(VERSION.major, VERSION.minor, VERSION.patch,
226+
isempty(VERSION.prerelease) ? () : (VERSION.prerelease[1],))
227+
return "v$(ver)"
225228
elseif Base.GIT_VERSION_INFO.branch == "master"
226229
return devurl
227230
end

0 commit comments

Comments
 (0)