Skip to content

Commit 028c87d

Browse files
committed
sfor testing new git status feature in dbwebb test
1 parent 07aaed9 commit 028c87d

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

.dbwebb/test/functions.bash

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,16 @@ execute_with_timeout () {
5555
fi
5656
return $status
5757
}
58+
59+
60+
61+
#
62+
# Check if git local is behind remote
63+
#
64+
check_if_need_pull () {
65+
if ! git diff --quiet remotes/origin/HEAD; then
66+
# Difference found
67+
return 1
68+
fi
69+
return 0
70+
}

.dbwebb/test/run.d.bash

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ for file in "${files[@]}"; do
175175
summary="$summary$output"
176176
done
177177

178+
check_if_need_pull
179+
status=$?
180+
if (( $status )); then
181+
echo && header "Uppdatera kursrepo"
182+
printf "$MSG_WARNING Det finns en uppdatering i kursrepot.\n\nKör kommandot 'dbwebb update' för att ladda ner uppdateringarna!\nOm du får ett fel av kommandot, läs följande länk https://github.com/dbwebb-se/python/issues/44#issuecomment-924686420."
183+
fi
184+
185+
178186
# Adding summary to log-file
179187
printf "\n\n$(header "Test summary")
180188
$summary\n" | tee -a "$LOG"

tutorial/bool-expr.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ y = 2
5858
print(y, "is in", x, "=", y in x)
5959

6060
print(y, "is not in", x, "=", y not in x)
61-
62-
6361
```
6462

6563

0 commit comments

Comments
 (0)