aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Geyer2024-06-19 20:36:15 +0200
committerPhilipp Geyer2024-06-19 20:36:15 +0200
commit4cafc4b88d5df15942c27344afcccf6e148c881a (patch)
treeff6e9f994fb14dad6dc6bbc0f5ebb9ec55006ff1
parent204bb3b0f50a3f31714b7a0ef1cf76fc6b5e2f61 (diff)
downloadsimpleci-4cafc4b88d5df15942c27344afcccf6e148c881a.tar.gz
simpleci-4cafc4b88d5df15942c27344afcccf6e148c881a.tar.bz2
simpleci-4cafc4b88d5df15942c27344afcccf6e148c881a.zip
don't spam buildlogs for builds that don't actually runHEADmain
-rwxr-xr-xsimpleci.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/simpleci.sh b/simpleci.sh
index 2fef632..57c2ff5 100755
--- a/simpleci.sh
+++ b/simpleci.sh
@@ -49,8 +49,9 @@ trigger() {
# echo BRANCH=${BRANCH}
# echo COMMAND=${COMMAND}
# echo DIR=${DIR}
- # echo FORCE=${FORCE}
+# echo FORCE=${FORCE}
+
pushd ${LOG_DIR} > /dev/null
git checkout -B ${DIR}
echo > build.log
@@ -66,13 +67,18 @@ trigger() {
git pull origin ${BRANCH} >> ${LOG_DIR}/build.log 2>&1
${COMMAND} >> ${LOG_DIR}/build.log 2>&1
popd > /dev/null
+ HAS_RUN=1
fi
fi
pushd ${LOG_DIR} > /dev/null
- git add build.log
- git commit -m "Build ${TIMESTAMP}"
- git push -u origin "${DIR}"
+ if [ "${HAS_RUN}" ] ; then
+ git add build.log
+ git commit -m "Build ${TIMESTAMP}"
+ git push -u origin "${DIR}"
+ else
+ git checkout build.log
+ fi
popd > /dev/null
}