Files
ionic-framework/scripts/clone/clone.sh
perry 74a67f6746 scripts(release): grab tags when cloning project for a release
I'm not sure this will work or not, next release will be a test
2015-04-13 16:32:51 -05:00

27 lines
478 B
Bash
Executable File

#!/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
git fetch
git fetch --tags
}
source $(dirname $0)/../utils.inc