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

Print a warning when main/master confusion detected #1489

Merged
merged 4 commits into from
Dec 9, 2020
Merged

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Dec 7, 2020

Print something like this in deploydocs

┌ Info: 
│ Buildkite config:
│   Commit branch: "main"
│   Pull request: "false"
│   Commit tag: ""
│ Detected build type: devbranch
│ - ✘ ENV["BUILDKITE_BRANCH"] matches devbranch="master"
│ - ✔ ENV["DOCUMENTER_KEY"] exists
└ Deploying to folder "dev": ✘
┌ Warning: Possible deploydocs() misconfiguration: main vs master
│ Documenter's configured primary development branch (`devbranch`) is "master", but the
│ current branch ($BUILDKITE_BRANCH) is "main". This can happen because Documenter uses
│ GitHub's old default primary branch name as the default value for `devbranch`.
│ 
│ If your primary development branch is 'main', you must explicitly pass `devbranch = "main"`
│ to deploydocs.
│ 
│ See #1443 for more discussion: https://github.com/JuliaDocs/Documenter.jl/issues/1443
└ @ Documenter ~/Julia/JuliaDocs/Documenter/src/deployconfig.jl:792

on Travis, GitHub Actions and BuildKite if the branch is main, but devbranch is not set. It doesn't detect the case where the user explicitly set devbranch = "master", but I think we can live with that (not worth the complexity).

Related to #1443.

@mortenpi mortenpi added this to the 0.26.0 milestone Dec 7, 2020
@mortenpi mortenpi merged commit 3430c65 into master Dec 9, 2020
@mortenpi mortenpi deleted the mp/main-warning branch December 9, 2020 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant