unity-builder/dist/remote-builder/cloneNoLFS.sh

20 lines
558 B
Bash
Raw Normal View History

#!/bin/sh
repoPathFull=$1
cloneUrl=$2
githubSha=$3
2021-07-12 21:33:50 +00:00
echo ''
echo "Cloning the repository being built:"
# DISABLE LFS
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
git config --global filter.lfs.process "git-lfs filter-process --skip"
2021-07-12 21:33:50 +00:00
# Init new repo and setup origin
git init --work-tree=$repoPathFull
git remote add origin $cloneUrl --work-tree=$repoPathFull
# Get remote version
2021-07-12 21:59:55 +00:00
git fetch --work-tree=$repoPathFull origin
git reset --work-tree=$repoPathFull --hard $githubSha
2021-07-12 21:33:50 +00:00
git lfs ls-files --all --work-tree=$repoPathFull
echo ''