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

Upgrade doc/make.jl to introspect branch/tag names from git info #32823

Merged
merged 1 commit into from
Aug 8, 2019
Merged
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
15 changes: 13 additions & 2 deletions doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,19 @@ makedocs(
# Only deploy docs from 64bit Linux to avoid committing multiple versions of the same
# docs from different workers.
if "deploy" in ARGS && Sys.ARCH === :x86_64 && Sys.KERNEL === :Linux
# Override TRAVIS_REPO_SLUG since we deploy to a different repo
withenv("TRAVIS_REPO_SLUG" => "JuliaLang/docs.julialang.org") do

# Override a few environment variables to deploy to the appropriate repository,
# encode things like branch, whether it's built on a tag, etc....
env_mappings = [
"TRAVIS_REPO_SLUG" => "JuliaLang/docs.julialang.org",
"TRAVIS_BRANCH" => Base.GIT_VERSION_INFO.branch,
Copy link
Contributor

@mortenpi mortenpi Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"TRAVIS_BRANCH" => Base.GIT_VERSION_INFO.branch,
"TRAVIS_BRANCH" => Base.GIT_VERSION_INFO.branch,
"TRAVIS_PULL_REQUEST" => "false",

]

if Base.GIT_VERSION_INFO.tagged_commit
push!(env_mappings, "TRAVIS_TAG" => string(Base.VERSION))
end

withenv(env_mappings...) do
deploydocs(
repo = "github.com/JuliaLang/docs.julialang.org.git",
target = joinpath(buildroot, "doc", "_build", "html", "en"),
Expand Down