Use git clone --depth (#26976)

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
This commit is contained in:
Pratik Raj 2020-09-08 12:57:10 +05:30 committed by GitHub
parent d0e980c2fa
commit cfc618ef44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@ fi
# - /opt/statsd
statsd_dir_contents=$(find /opt/statsd -mindepth 1 -print -quit)
if [[ -z $statsd_dir_contents ]]; then
git clone -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
git clone --depth 1 -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
cp $conf_dir/opt/statsd/config.js /opt/statsd/config.js
fi

View File

@ -60,8 +60,8 @@ Next we will clone carbon and whisper and install these components. Whisper is j
by carbon to write metrics to disk.
cd /usr/local/src
git clone https://github.com/graphite-project/carbon.git
git clone https://github.com/graphite-project/whisper.git
git clone --depth 1 https://github.com/graphite-project/carbon.git
git clone --depth 1 https://github.com/graphite-project/whisper.git
cd whisper && python setup.py install && cd ..
cd carbon && python setup.py install && cd ..

View File

@ -187,7 +187,7 @@ jobs:
- << pipeline.parameters.ssh-fingerprint >>
- run:
name: Checkout provisioning files
command: git clone git@github.com:grafana/plugin-provisioning.git
command: git clone --depth 1 git@github.com:grafana/plugin-provisioning.git
- run:
name: Prepare task output dir
command: |

View File

@ -49,7 +49,7 @@ chmod +x /usr/local/bin/grabpl
apk add --no-cache git
# Install Mage
mkdir -pv /tmp/mage $HOME/go/bin
git clone https://github.com/magefile/mage.git /tmp/mage
git clone --depth 1 https://github.com/magefile/mage.git /tmp/mage
cd /tmp/mage && go run bootstrap.go
mv $HOME/go/bin/mage /usr/local/bin

View File

@ -48,7 +48,7 @@ chmod +x /usr/local/bin/grabpl
# Install Mage
mkdir -pv /tmp/mage $HOME/go/bin
git clone https://github.com/magefile/mage.git /tmp/mage
git clone --depth 1 https://github.com/magefile/mage.git /tmp/mage
pushd /tmp/mage && go run bootstrap.go && popd
mv $HOME/go/bin/mage /usr/local/bin
# Cleanup after yourself

View File

@ -32,7 +32,7 @@ chmod +x /usr/local/bin/grabpl
# Install Mage
mkdir -pv /tmp/mage $HOME/go/bin
git clone https://github.com/magefile/mage.git /tmp/mage
git clone --depth 1 https://github.com/magefile/mage.git /tmp/mage
pushd /tmp/mage && go run bootstrap.go && popd
mv $HOME/go/bin/mage /usr/local/bin
# Cleanup after yourself

View File

@ -2,4 +2,4 @@
set -e
git clone git@github.com:torkelo/private.git ~/private-repo
git clone --depth 1 git@github.com:torkelo/private.git ~/private-repo