...
 
Commits (2)
...@@ -39,7 +39,7 @@ XMPP_ADDRESS= ...@@ -39,7 +39,7 @@ XMPP_ADDRESS=
COPY_IMAGES= COPY_IMAGES=
SYNCHRONOUS= SYNCHRONOUS=
USE_BUILD_LOG=no USE_BUILD_LOG=no
UPDATE_SEC=600 UPDATE_SEC=300
function create_daemon { function create_daemon {
daemon="$1" daemon="$1"
...@@ -230,7 +230,7 @@ function create_web_page { ...@@ -230,7 +230,7 @@ function create_web_page {
end_date=$(grep "end:" "$results" | sed 's|end:||g') end_date=$(grep "end:" "$results" | sed 's|end:||g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
test_dir=$(echo "$d" | sed 's|/||g') test_dir=$(echo "$d" | sed 's|/||g')
CURR_COMMIT=$(grep "head:" "$results" | awk -F ':' '{print $2}') CURR_COMMIT=$(grep "head:" "$results" | awk -F ':' '{print $2}' | tr -d '[:space:]')
# get the colour corresponding to the build status # get the colour corresponding to the build status
text_color='green' text_color='green'
...@@ -240,7 +240,7 @@ function create_web_page { ...@@ -240,7 +240,7 @@ function create_web_page {
fi fi
if [[ "$status" == 'fail'* ]]; then if [[ "$status" == 'fail'* ]]; then
text_color='red' text_color='red'
last_good_commit=$(grep "commit:" "$results" | awk -F ':' '{print $2}') last_good_commit=$(grep "commit:" "$results" | awk -F ':' '{print $2}' | tr -d '[:space:]')
if [ "$last_good_commit" ]; then if [ "$last_good_commit" ]; then
if [[ "$last_good_commit" != "$CURR_COMMIT" ]]; then if [[ "$last_good_commit" != "$CURR_COMMIT" ]]; then
last_good_commit_str="<br><font color=\"green\">$last_good_commit</font>" last_good_commit_str="<br><font color=\"green\">$last_good_commit</font>"
...@@ -319,7 +319,7 @@ function update { ...@@ -319,7 +319,7 @@ function update {
git pull git pull
# Get the current commit for the head of the repo # Get the current commit for the head of the repo
CURR_COMMIT=$(git log -n 1 | grep commit | awk -F ' ' '{print $2}') CURR_COMMIT=$(git log -n 1 | grep commit | awk -F ' ' '{print $2}' | tr -d '[:space:]')
# No build is currently in progress # No build is currently in progress
PREV_COMMIT= PREV_COMMIT=
...@@ -328,7 +328,7 @@ function update { ...@@ -328,7 +328,7 @@ function update {
if [ -f $BIRB_FILE ]; then if [ -f $BIRB_FILE ]; then
# Get the last commit for which a build was attempted # Get the last commit for which a build was attempted
LAST_COMMIT_TRIED=$(grep 'last:' $BIRB_FILE | awk -F ':' '{print $2}') LAST_COMMIT_TRIED=$(grep 'last:' $BIRB_FILE | awk -F ':' '{print $2}' | tr -d '[:space:]')
# If this is the same as the current head then do nothing # If this is the same as the current head then do nothing
if [[ "$LAST_COMMIT_TRIED" == "$CURR_COMMIT" ]]; then if [[ "$LAST_COMMIT_TRIED" == "$CURR_COMMIT" ]]; then
...@@ -337,7 +337,7 @@ function update { ...@@ -337,7 +337,7 @@ function update {
fi fi
# Get the currently in progress build commit # Get the currently in progress build commit
PREV_COMMIT=$(grep 'commit:' $BIRB_FILE | awk -F ':' '{print $2}') PREV_COMMIT=$(grep 'commit:' $BIRB_FILE | awk -F ':' '{print $2}' | tr -d '[:space:]')
fi fi
# If the currently in progress build is the head then do nothing # If the currently in progress build is the head then do nothing
...@@ -368,7 +368,7 @@ function update { ...@@ -368,7 +368,7 @@ function update {
else else
# create a new results file for this app # create a new results file for this app
{ echo "commit:"; { echo "commit:";
echo "head: ${CURR_COMMIT}"; echo "head:${CURR_COMMIT}";
echo "start:$(date +%s)"; echo "start:$(date +%s)";
echo "end:"; echo "end:";
echo "last:"; echo "last:";
......