diff --git a/modules/jenkins/files/slave_scripts/propose_requirements_update.sh b/modules/jenkins/files/slave_scripts/propose_requirements_update.sh index 6c42a99e45..c57a6c116f 100755 --- a/modules/jenkins/files/slave_scripts/propose_requirements_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_requirements_update.sh @@ -56,29 +56,32 @@ EOF PROJECT_DIR=$(basename $PROJECT) rm -rf $PROJECT_DIR git clone ssh://$USERNAME@review.openstack.org:29418/$PROJECT.git - pushd $PROJECT_DIR - git checkout $BRANCH - git review -s - if [ -n "$change_id" ] ; then - git review -d $change_id - fi - popd - python update.py $PROJECT_DIR - - pushd $PROJECT_DIR - if ! git diff --exit-code HEAD ; then - # Commit and review - git_args="-a -F-" + # make sure the project even has this branch + if git branch -a | grep -q "^ remotes/origin/$BRANCH$" ; then + git checkout $BRANCH + git review -s if [ -n "$change_id" ] ; then - git_args="--amend $git_args" + git review -d $change_id fi - git commit $git_args <