Fixed publish-staging.sh:
first add, then check for modified files and commit
only push to master if something was committed
@@ -46,19 +46,19 @@ __EOF__
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
-if [ -n "$(git status --porcelain)" ]; then
git add -A
- git commit --message "client-go update by Travis Build ${TRAVIS_BUILD_NUMBER}"
-else
- echo "client-go hasn't changed."
-fi
+if [ -n "$(git status --porcelain)" ]; then
+ git commit --message "client-go update by Travis Build ${TRAVIS_BUILD_NUMBER}"
# we only push branch changes on master
if [ "${TARGET_BRANCH}" == "master" ]; then
git push origin ${TARGET_BRANCH}
echo "client-go updated for ${TARGET_BRANCH}."
fi
+else
+ echo "client-go hasn't changed."
+fi
if [ -n "${TARGET_TAG}" ]; then
if [ $(git tag -l "${TARGET_TAG}") ]; then
