Cloning GitHub subfolder only

raul's Avatar

raul

19 Jul, 2019 10:27 PM

Hi,

is it possible with AppVeyor to clone only a subfolder from the repo? We do not need the entire repo for our Windows build, and it would be a massive time improvement.

Perhaps similarly to how submodules are updated during install step. I have not seen how to prevent the entire repo from cloning though.

Thanks,
Raul.

  1. 1 Posted by raul on 23 Jul, 2019 07:05 PM

    raul's Avatar

    I'll answer my own question.

    clone_script in .appveyor.yml overrides the default clone command, so you can do custom cloning there. See https://github.com/appveyor/ci/issues/899 for an example.

    However, git does not provide an easy way to pull a subfolder, and there's some trickery required. We decided to delay the implementation to keep our build system simple and more maintainable, and would probably use subtrees or submodules as an alternative.

  2. 2 Posted by Owen McDonnell on 23 Jul, 2019 09:57 PM

    Owen McDonnell's Avatar

    Sorry to have missed your original ticket.
    Looks like you found the clone_script override option.
    I agree that submodules would be the simplest way to go if you want to break a large repo into smaller more manageable projects.

  3. Ilya Finkelshteyn closed this discussion on 23 Sep, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac