mirror of
https://github.com/marado/RNID.git
synced 2024-12-22 11:55:59 +00:00
scripts: act: better debug
We were actually running wget and letting the user see the output... and get its error code, which is quite fine in a manual run, but messes with the automatic running of these scripts. Now, we still do wget and validate its error code, but instead the script then does its business as usual (and hopefully this fixes our cron'ed GA). This patch also changes the time at which the scheduled cronjob runs, just because it is still once a day, which is what we want, and will give us still a run today (so we can have it run with this change sooner rather than later).
This commit is contained in:
parent
60f866f9fa
commit
8708cff55d
4
.github/workflows/scripts.yml
vendored
4
.github/workflows/scripts.yml
vendored
@ -2,8 +2,8 @@ name: Validação automática
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# Every day at 1:00 (AM) UTC
|
# Every day at 11:00 (AM) UTC
|
||||||
- cron: '0 1 * * *'
|
- cron: '0 11 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-validation-scripts:
|
run-validation-scripts:
|
||||||
|
@ -8,8 +8,9 @@ fi
|
|||||||
|
|
||||||
if [ "$( echo "$content" | grep -i "<img" |grep -v -i alt|wc -l)" -eq "0" ]; then
|
if [ "$( echo "$content" | grep -i "<img" |grep -v -i alt|wc -l)" -eq "0" ]; then
|
||||||
echo "act: incumprimento pode já não existir";
|
echo "act: incumprimento pode já não existir";
|
||||||
echo "DEBUG: aqui o output do wget:";
|
if [ "$(wget -t 1 --no-check-certificate http://www.act.gov.pt/ --user-agent="Mozilla/5.0 Gecko/20100101 Firefox/21.0"; echo $?)" -eq "4" ]; then
|
||||||
wget -t 1 --no-check-certificate http://www.act.gov.pt/ --user-agent="Mozilla/5.0 Gecko/20100101 Firefox/21.0"
|
echo "[!] o teste falhou: o wget não conseguiu obter o site, por 'Network failure'.";
|
||||||
|
fi
|
||||||
# TODO: verificar também se o problema com o certiicado ja' esta' resolvido
|
# TODO: verificar também se o problema com o certiicado ja' esta' resolvido
|
||||||
else
|
else
|
||||||
echo "act: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)";
|
echo "act: Incumprimento mantém-se, a actualizar o README (faça um git diff, valide, e commit!)";
|
||||||
|
Loading…
Reference in New Issue
Block a user