chore(travis): fix git-commit-msg extraction

[skip-ci]
This commit is contained in:
Soonho Kong 2013-09-28 13:33:13 -07:00
parent fb3635a9ef
commit d48ec2ddfa
3 changed files with 13 additions and 10 deletions

View file

@ -63,11 +63,12 @@ after_script:
yes "C" | ctest -D ExperimentalMemCheck -VV;
fi
- if [[ $PUSH_TO_CDASH == TRUE ]]; then
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`;
GIT_SUBJECT=${GIT_SUBJECT//\"/};
GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`;
GIT_SUBJECT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 2-`;
GIT_SUBJECT=${GIT_SUBJECT//\"/\\\"};
GIT_SUBJECT=${GIT_SUBJECT//,/\,};
GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
find Testing -name "*.xml" -exec sed -i "" "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";";
find Testing -name "*.xml" -exec sed -i "" "s,Generator=\".*\",Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"," {} ";";
ctest -D ExperimentalSubmit;
fi
- cd ..

View file

@ -45,11 +45,12 @@ script:
- sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE
- ctest -D ExperimentalBuild -VV
- if [[ $PUSH_TO_CDASH == TRUE ]]; then
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`;
GIT_SUBJECT=${GIT_SUBJECT//\"/};
GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1`;
GIT_SUBJECT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 2-`;
GIT_SUBJECT=${GIT_SUBJECT//\"/\\\"};
GIT_SUBJECT=${GIT_SUBJECT//,/\,};
GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
find Testing -name "*.xml" -exec sed -i "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";";
find Testing -name "*.xml" -exec sed -i "s,Generator=\".*\",Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"," {} ";";
find Testing -type f -name "*.xml" -exec sed -i 's/OSName=\"Linux\"/OSName=\"Windows\"/' {} \; ;
ctest -D ExperimentalSubmit;
fi

View file

@ -210,9 +210,10 @@ after_script:
- if [[ $LEANREPO == BLESSED && $PUSH_TO_CDASH == TRUE ]]; then
GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`;
GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`;
GIT_SUBJECT=${GIT_SUBJECT//\"/};
GIT_SUBJECT=${GIT_SUBJECT//\"/\\\"};
GIT_SUBJECT=${GIT_SUBJECT//,/\,};
GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT"));
find Testing -name "*.xml" -exec sed -i "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";";
find Testing -name "*.xml" -exec sed -i "s,Generator=\".*\",Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"," {} ";";
ctest -D ExperimentalSubmit;
fi
- cd ..