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

26 lines
621 B
Bash
Raw Normal View History

#!/bin/sh
repoPathFull=$1
cloneUrl=$2
githubSha=$3
cd $repoPathFull
2021-07-12 22:12:18 +00:00
2021-07-12 23:01:51 +00:00
echo ' '
2021-07-12 21:33:50 +00:00
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
2021-07-12 22:12:18 +00:00
git init $repoPathFull
git remote add origin $cloneUrl
2021-07-12 21:33:50 +00:00
# Get remote version
2021-07-12 22:12:18 +00:00
git fetch origin
git reset --hard $githubSha
2021-07-12 23:01:51 +00:00
# ENABLE LFS
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
git config --global filter.lfs.process "git-lfs filter-process"
# List git lfs files
2021-07-12 22:12:18 +00:00
git lfs ls-files --all
2021-07-12 23:01:51 +00:00
echo ' '