Skip to content

Commit 6da8e29

Browse files
committed
Made watch script error handling stricter
1 parent bc8623a commit 6da8e29

File tree

10 files changed

+14
-8
lines changed

10 files changed

+14
-8
lines changed

gui/vlc.watch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import re
44
from datetime import datetime
55

6+
skipped_versions = ['3.0.11.1']
7+
68
data = request.urlopen('https://get.videolan.org/vlc/').read().decode('utf-8')
79
matches = re.findall(r'/">([0-9\.]+)/</a>\s+(..-...-....)', data)
8-
releases = [{'version': match[0], 'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d')} for match in matches if match[0].startswith('3.')]
10+
releases = [{'version': match[0], 'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d')} for match in matches if match[0].startswith('3.') and match[0] not in skipped_versions]

lib/gcc-libs.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
gcc-libs 0watch script for packages from the mingw64 project
44

lib/gmp.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
gmp 0watch script for packages from the mingw64 project
44

lib/gnumpc.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
gnumpc 0watch script for packages from the mingw64 project
44

lib/libwinpthread.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
libwinpthread 0watch script for mingw64 projects libwinpthread feed
44
"""

lib/mpfr4.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
mpfr v4 0watch script for packages from the mingw64 project
44
"""

lib/png16-0.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
libpng v1.6 0watch script for packages from the mingw64 project
44
"""

lib/zlib.watch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#os=Linux
1+
#os=MinGW
22
"""
33
zlib 0watch script for packages from the mingw64 project
44
"""

watch.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
$ErrorActionPreference = "Stop"
12
pushd $PSScriptRoot
23

34
if (-not (Test-Path "..\incoming" -PathType Container)) {
@@ -9,8 +10,10 @@ foreach ($file in (ls -Recurse -Filter *.watch.py).FullName) {
910
$header = Get-Content $file -TotalCount 1
1011
if (($header -eq "#os=Windows") -or (-not $header.StartsWith("#os="))) {
1112
echo $file
13+
$ErrorActionPreference = "Continue"
1214
#.\0install.ps1 run --batch https://apps.0install.net/0install/0watch.xml --output ..\incoming $file
1315
.\0install.ps1 run --batch 0watch-windows.xml.selections --output ..\incoming $file
16+
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
1417
}
1518
}
1619

watch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -e
23
cd `dirname $0`
34

45
if [ ! -d "../incoming" ]; then

0 commit comments

Comments
 (0)