Disabling creation of testing notes during pre-push testing

This commit is contained in:
Ruben Ayrapetyan
2014-08-21 20:13:17 +04:00
parent dfcc3a0986
commit 148d9c4cb6
+20 -20
View File
@@ -57,13 +57,13 @@ trap ctrl_c INT
function ctrl_c() { function ctrl_c() {
git checkout master >&/dev/null git checkout master >&/dev/null
for commit_hash in $commits_to_push # for commit_hash in $commits_to_push
do # do
git notes --ref=test_build_env remove $commit_hash # git notes --ref=test_build_env remove $commit_hash
git notes --ref=perf remove $commit_hash # git notes --ref=perf remove $commit_hash
git notes --ref=mem remove $commit_hash # git notes --ref=mem remove $commit_hash
done # done
exit 1 # exit 1
} }
echo echo
@@ -77,9 +77,9 @@ do
git checkout $commit_hash >&/dev/null git checkout $commit_hash >&/dev/null
status_code=$? status_code=$?
git notes --ref=test_build_env remove $commit_hash >&/dev/null # git notes --ref=test_build_env remove $commit_hash >&/dev/null
git notes --ref=perf remove $commit_hash >&/dev/null # git notes --ref=perf remove $commit_hash >&/dev/null
git notes --ref=mem remove $commit_hash >&/dev/null # git notes --ref=mem remove $commit_hash >&/dev/null
if [ $status_code -ne 0 ] if [ $status_code -ne 0 ]
then then
@@ -118,9 +118,9 @@ do
echo "Pre-commit performance measurement for '$commit_hash' completed" echo "Pre-commit performance measurement for '$commit_hash' completed"
echo echo
git notes --ref=test_build_env add -m "$BUILD_INFO" $commit_hash # git notes --ref=test_build_env add -m "$BUILD_INFO" $commit_hash
git notes --ref=perf add -m "$PERF_INFO" $commit_hash # git notes --ref=perf add -m "$PERF_INFO" $commit_hash
git notes --ref=mem add -m "$MEM_INFO" $commit_hash # git notes --ref=mem add -m "$MEM_INFO" $commit_hash
done done
git checkout master >&/dev/null git checkout master >&/dev/null
@@ -145,7 +145,7 @@ then
echo "Pushing..." echo "Pushing..."
echo echo
git push origin master refs/notes/* git push origin master # refs/notes/*
status_code=$? status_code=$?
if [ $status_code -eq 0 ] if [ $status_code -eq 0 ]
@@ -154,12 +154,12 @@ then
else else
echo -e "\n\e[1;33m Push failed\e[0m" echo -e "\n\e[1;33m Push failed\e[0m"
for commit_hash in $commits_to_push # for commit_hash in $commits_to_push
do # do
git notes --ref=test_build_env remove $commit_hash # git notes --ref=test_build_env remove $commit_hash
git notes --ref=perf remove $commit_hash # git notes --ref=perf remove $commit_hash
git notes --ref=mem remove $commit_hash # git notes --ref=mem remove $commit_hash
done # done
fi fi
exit $status_code exit $status_code
else else