build(publish): shallow fetch to improve perfs (depth=1)

This commit is contained in:
Victor Berchet 2016-08-31 19:07:06 -07:00 committed by Martin Probst
parent 04d02b55d1
commit 53cf71430f
1 changed files with 2 additions and 3 deletions

View File

@ -18,7 +18,7 @@ function publishRepo {
cd $REPO_DIR && \ cd $REPO_DIR && \
git init && \ git init && \
git remote add origin $REPO_URL && \ git remote add origin $REPO_URL && \
git fetch origin master && \ git fetch origin master --depth=1 && \
git checkout origin/master && \ git checkout origin/master && \
git checkout -b master git checkout -b master
) )
@ -49,9 +49,8 @@ function publishRepo {
git config user.email "${COMMITTER_USER_EMAIL}" && \ git config user.email "${COMMITTER_USER_EMAIL}" && \
git add --all && \ git add --all && \
git commit -m "${COMMIT_MSG}" && \ git commit -m "${COMMIT_MSG}" && \
git push origin master && \
git tag "${BUILD_VER}" && \ git tag "${BUILD_VER}" && \
git push origin --tags --force git push origin master --tags --force
) )
} }