mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
chore(circle): circle scripts require git scripts
This commit is contained in:
parent
fca309dee2
commit
e84f9a6959
26
scripts/git/clone.sh
Executable file
26
scripts/git/clone.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
ARG_DEFS=(
|
||||
"--repository=(.*)"
|
||||
"--directory=(.*)"
|
||||
"[--depth=(.*)]"
|
||||
"[--branch=(.*)]"
|
||||
)
|
||||
|
||||
function run {
|
||||
rm -rf $DIRECTORY
|
||||
mkdir -p $DIRECTORY
|
||||
|
||||
echo "-- Cloning $REPOSITORY#$BRANCH to $DIRECTORY..."
|
||||
|
||||
ARGS="--branch=${BRANCH:-master}"
|
||||
if [[ "$DEPTH" != "" ]]; then
|
||||
ARGS="$ARGS --depth=$DEPTH"
|
||||
fi
|
||||
git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS
|
||||
cd $DIRECTORY
|
||||
git fetch origin --tags
|
||||
cd ../
|
||||
}
|
||||
|
||||
source $(dirname $0)/../utils.sh.inc
|
Loading…
Reference in New Issue
Block a user