Commit graph

6 commits

Author SHA1 Message Date
Reedy
c13fee87d4 Collapse some nested if statements
Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
2019-04-04 19:02:22 +00:00
Timo Tijhof
3540897a6f resources: Add caching for faster runs and offline use
Also honour any XDG variables if set (such as Wikimedia CI does)
so that gate jobs can automatically persist the cache.

Bug: T203694
Change-Id: I156af1c5097b8a87be228345fc0a0b80bb3ae338
2019-03-24 20:57:46 +00:00
Timo Tijhof
dd6beafe61 resources: Improve foreign-resources docs and error messages
Previously, the help message was only shown when invoking the script
without parameters. Now, if invoking it with incorrect or mispelled
parameters, it shows what you can do instead (and no more exception trace,
which it did before).

Also document clearly but briefly how to use it, and with examples.

Change-Id: Ib5ba3dc02c54039495a33d6e0cc4d026ca708ba1
2019-03-24 20:57:46 +00:00
Thiemo Kreuz
bb786be640 Add /** @var SplFileInfo $fileInfo */ docs where needed
Change-Id: Ia844af3347db52f9f004892578ba4aefac7dd875
2019-03-14 15:04:05 +01:00
Timo Tijhof
ed5f7a6d27 ForeignResourceManager: Catch responses other than 200 OK
Makes it easier to catch issues like at I839301d05877eb63279c.

Change-Id: I22b9af7bf36a256d8363ed96fe42c087e0c8a895
2019-02-21 23:47:40 +00:00
Timo Tijhof
54bd639467 resources: Extract ForeignResourceManager from manageForeignResources.php
This should make it easier to test, and would also allow other repositories
to create an instance of it in a maintenance script of their own.

Change-Id: I6a28e184f80eb38b5c25a0be5a9041f0c587c852
2018-10-15 03:16:18 +01:00