update: only copy graphics and screenshots if mtime/size has changed

Instead of copying every time, trust the filesystem to tell us when the
file has changed.
This commit is contained in:
Hans-Christoph Steiner 2019-08-28 12:25:53 +02:00
parent fbdecbceb7
commit 508af00e84
No known key found for this signature in database
GPG key ID: 3E177817BA1B9BFA
3 changed files with 35 additions and 11 deletions

View file

@ -66,6 +66,13 @@ class UpdateTest(unittest.TestCase):
shutil.copytree(os.path.join('source-files', 'eu.siacs.conversations'),
os.path.join('build', 'eu.siacs.conversations'))
testfile = os.path.join('repo', 'org.videolan.vlc', 'en-US', 'icon.png')
cpdir = os.path.join('metadata', 'org.videolan.vlc', 'en-US')
cpfile = os.path.join(cpdir, 'icon.png')
os.makedirs(cpdir, exist_ok=True)
shutil.copy(testfile, cpfile)
shutil.copystat(testfile, cpfile)
apps = dict()
for packageName in ('info.guardianproject.urzip', 'org.videolan.vlc', 'obb.mainpatch.current',
'com.nextcloud.client', 'com.nextcloud.client.dev',