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
|
|
|
|
|
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 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
|
|
|
|
|
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
|
|
|
|
|
git config --global filter.lfs.process "git-lfs filter-process"
|
2021-07-12 23:10:34 +00:00
|
|
|
|
|
|
|
|
tree
|
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 ' '
|