2021-07-12 21:06:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
repoPathFull=$1
|
|
|
|
|
cloneUrl=$2
|
|
|
|
|
githubSha=$3
|
|
|
|
|
|
2021-07-12 22:18:42 +00:00
|
|
|
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:"
|
2021-07-12 21:06:03 +00:00
|
|
|
# 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
|
2021-07-12 23:10:34 +00:00
|
|
|
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
|
2021-07-12 23:10:34 +00:00
|
|
|
|
|
|
|
|
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 ' '
|