Skip to content

Commit 2481d95

Browse files
authored
Merge pull request #2179 from wilzbach/curl-hard-fail
Turn curl downloads of the DBlog into hard failures merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2 parents cad41c0 + 323d917 commit 2481d95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

posix.mak

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ $G/dlangspec.verbatim.txt : $G/dlangspec-consolidated.d $(DMD) verbatim.ddoc
577577

578578
$G/dblog_latest.ddoc:
579579
@echo "Receiving the latest DBlog article. Disable with DIFFABLE=1"
580-
curl -s --retry 3 --retry-delay 5 http://blog.dlang.org > $(TMP)/blog.html
580+
curl -s --fail --retry 3 --retry-delay 5 http://blog.dlang.org > $(TMP)/blog.html
581+
@[ $? -eq 0 ] || (echo "Curl couldn't connect to the DBlog."; exit 1)
581582
cat $(TMP)/blog.html | grep -m1 'entry-title' | \
582583
sed -E 's/^.*<a href="(.+)" rel="bookmark">([^<]+)<\/a>.*<time.*datetime="[^"]+">([^<]*)<\/time><time class="updated".*Author *<\/span><a [^>]+>([^<]+)<\/a>.*/DBLOG_LATEST_TITLE=\2|DBLOG_LATEST_LINK=\1|DBLOG_LATEST_DATE=\3|DBLOG_LATEST_AUTHOR=\4/' | \
583584
tr '|' '\n' > $@

0 commit comments

Comments
 (0)