-
Notifications
You must be signed in to change notification settings - Fork 867
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
Getting branch name fails on AppVeyor #1097
Comments
|
Just like my comments in your PR, I don't think it's a bug in DocFX. |
I will leave my thoughts on this too, in case it is helpful. Richard> You might find a 'git checkout master' helps you, even if it is not a nice/clean solution. Qinezh> |
I submit a PR #1100 to fix the wrong branch name when doc repo in detached head. In this case, we'll use commit id instead of |
PR #1100 is a good fall back. However, it does help with building documentation on AppVeyor. When building the doc, I want the yml to point to the branch, not the commit id. Basically, use doxfx to create the documentation and then push to |
So you want to build documentation from history commit but generate |
No, the typical use case is to AppVeyor build the documentation whenever
ANY branch changes; rebuilding from history is just a nice side-effect from
using AppVeyor.
…On 3 January 2017 at 17:08, Qinen Zhu ***@***.***> wrote:
So you want to build documentation from history commit but generate view
source url with branch name instead of commit id, am I right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1097 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAmhFdCBl_14iOtMHtmrOe-6LUpUWZx6ks5rOcmygaJpZM4LYoCb>
.
|
In this case, why not use |
Because it could also be building a PR. As
https://github.com/cameron-elliott mentioned its not a nice/clean solution.
Don't you want dotfx to run correctly out of the box for build systems? I
believe Travis also does the same with headless branches. Why are you
resisting this change?
…On 3 January 2017 at 17:20, Qinen Zhu ***@***.***> wrote:
Why not use git checkout <branch_name> once AppVeyor has cloned your repo
with detached head?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1097 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAmhFUZc2dGU3ZKFEp-0SzcE4mCXBp0Oks5rOcyfgaJpZM4LYoCb>
.
|
OK, let's assume that you're building a PR in AppVeyor, which branch you want to show in |
I had the same issues Richard had, I am not saying there is a 'correct' solution, but my recommendation Team leader discussion: @qinezh @vicancy @vwxyzh
If this can work, you are the experts on whether it is a good idea or not,
It is of course, your team's decision, but I know outside user-experience feedback can be helpful, so I am sharing my experience and thoughts. I really really like DocFX, by the way! I use it for a project I am working on: https://cameron-elliott.github.io/LimeVideoSDK/ But honestly I had to work around a number of surprising difficulties to get it to work correctly. |
I have some solutions for your problem: Option 1: in AppVeyor part:
Option 2: in DocFX part:
Then let's talk about your PR. I think there're some hard logic in it, which may cause other issue, such as, "Why I can't generate We have a plan to add a switcher to disable git command for uses who don't need git information. As for your advice, I don't think it's a good solution to require users to configure git URL mapping in docfx.json, since some users may want DocFX to get git information automatically. Then, how about adding git URL mapping as an option? Honestly speaking, I couldn't find common scenario to use this config. Of course, maybe you want to use the config while git command is disabled with the switcher I mentioned. But I don't think it's a common case and why not use git command directly... @richardschneider @Cameron-elliott I just want to help resolve this issue, please don't be mind :) |
We use this as a Powershell Script on VSTS to get the right branches.
We have submodules for different repositories in the /src folder. But as PowerShell ist critical, because as .bat the checkout of the submodules does not work because of missing git .... |
PR #1098 fixes this issue. |
Title
Getting the branch name fails on AppVeyor
Functional impact
Seeing this error:
The
View source
link is wrong. It is usingHEAD
instead of the branch that is being built.Minimal repro steps
I've cloned
docfx-seed
at https://github.com/richardschneider/docfx-seed and created a branch namedmsdn-xref
(see issue #1078).re-build commit
Further technical details
Most CIs, such as AppVeyor, use a git detached head to build a new commit.
The text was updated successfully, but these errors were encountered: