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

32 lines
543 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
2021-07-12 23:37:23 +00:00
export GIT_LFS_SKIP_SMUDGE=1
2021-07-12 21:33:50 +00:00
# Init new repo and setup origin
git init
2021-07-12 22:12:18 +00:00
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
2021-07-12 23:37:23 +00:00
export GIT_LFS_SKIP_SMUDGE=0
tree
2021-07-12 23:37:23 +00:00
echo ' '
2021-07-12 23:01:51 +00:00
# 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 ' '
2021-07-12 23:37:23 +00:00
git lfs ls-files -l | cut -d ' ' -f1 | sort
echo ' '
git lfs ls-files -l | cut -d ' ' -f1 | sort > $1/.lfs-assets-id
echo ' '