Search Unity

Running a shell script to setup a git sparse-checkout

Discussion in 'Unity Cloud Build' started by ESG-Steven, May 30, 2016.

  1. ESG-Steven

    ESG-Steven

    Joined:
    Mar 18, 2015
    Posts:
    38
    Hey Everyone!

    Our library (of which is nested in our Unity /Assets folder) has a ton of modules and all our projects are often setup using git sparse-checkout to determine which modules are useful. I've already got submodules working correctly in UCB, but I'd like to have something that lets me remove modules from the cloud's local copy based on a shell script.

    It seems silly to do this manually (via I.O. and deleting every directory that isn't included in the git.sparsecheckout) when our project already has a 'setup.sh' that automatically setups up the sparsecheckouts and updates all local copies.

    Does the server/vm running cloudbuild have git around while it's executing my pre-build phase? That way I could just execute the shell script and wait. Perhaps there's a better approach I could be taking?

    Thanks for any help!