Skip to content

Commit

Permalink
stop deploying to the release- folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Apr 24, 2018
1 parent e6d29f8 commit 11deb1b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ deploydocs(
)
```
When building the docs for a tag (i.e. a release) the documentation is deployed to
a directory with the tag name (i.e. `vX.Y.Z`) and to the `stable` directory.
Otherwise the docs are deployed to the `latest` directory.
# Required keyword arguments
**`julia`** is the version of Julia that will be used to deploy generated documentation.
Expand Down Expand Up @@ -472,6 +476,9 @@ end
)
Handles pushing changes to the remote documentation branch.
When `tag` is empty the docs are deployed to the `latest` directory,
and when building docs for a tag they are deployed to a `vX.Y.Z` directory,
and also to the `stable` directory.
"""
function git_push(
root, temp, repo;
Expand Down Expand Up @@ -538,10 +545,6 @@ function git_push(
end
gitrm_copy(target_dir, tagged_dir)
Writers.HTMLWriter.generate_siteinfo_file(tagged_dir, tag)
# Build a `release-*.*` folder as well
release = "release-$(version.major).$(version.minor)"
gitrm_copy(target_dir, joinpath(dirname, release))
Writers.HTMLWriter.generate_siteinfo_file(joinpath(dirname, release), release)
end

# Create the versions.js file containing a list of all docs
Expand Down
2 changes: 1 addition & 1 deletion src/Writers/HTMLWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ function generate_version_file(dir::AbstractString)
sort!(release_folders, lt = (x, y) -> vnum(x) < vnum(y), rev = true)
open(joinpath(dir, "versions.js"), "w") do buf
println(buf, "var DOC_VERSIONS = [")
for group in (named_folders, release_folders, tag_folders)
for group in (named_folders, tag_folders, release_folders)
for folder in group
println(buf, " \"", folder, "\",")
end
Expand Down
2 changes: 1 addition & 1 deletion test/htmlwriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Documenter.Writers.HTMLWriter: jsescape, generate_version_file
@test jsescape("policy to
 delete.") == "policy to\\u2028 delete."

mktempdir() do tmpdir
versions = ["stable", "latest", "release-0.2", "release-0.1", "v0.2.6", "v0.1.1", "v0.1.0"]
versions = ["stable", "latest", "v0.2.6", "v0.1.1", "v0.1.0", "release-0.2", "release-0.1"]
cd(tmpdir) do
mkdir("foobar")
for version in versions
Expand Down

0 comments on commit 11deb1b

Please sign in to comment.