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. Support Staff 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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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