diff options
author | Ben Brown <ben@demerara.io> | 2022-02-05 14:06:19 +0000 |
---|---|---|
committer | Ben Brown <ben@demerara.io> | 2022-02-05 14:06:19 +0000 |
commit | 380c53b1890b1c736d64a178fa6e258e3c39ae0d (patch) | |
tree | 8d54bab735601f74d9f5d7b6a2a72be09e8f46c2 | |
parent | 42631fd09d543d60b96de3ddea4a05892f82d728 (diff) | |
parent | 7008cc18394bdc508b0d201513961aeb01811bdd (diff) | |
download | lorry-380c53b1890b1c736d64a178fa6e258e3c39ae0d.tar.gz |
Merge branch 'benbrown/optional-dest' into 'master'
Set 'destination' field as optional
See merge request CodethinkLabs/lorry/lorry!34
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | lorry | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -290,9 +290,9 @@ Lorry can store raw files in a git LFS repository, which may allow your git server to serve those files via its repository browser. For convenience, raw file lorries can specify multiple sources to store in the -same repository. Each raw file will be stored under a subpath corresponding to -the source name, specify `.` to store the raw file at the root of the -repository. +same repository. By default each raw file will be stored at the root of the +repository, unless otherwise specified by the optional `destination` field, +which specifies the subdirectory under which the raw file will be stored. { "raw-file-repo": { @@ -813,7 +813,7 @@ class Lorry(cliapp.Application): file_dest = os.path.join(dirname, basename) self.progress('.. checking if we need to fetch %s' % basename) if file_missing_or_empty(file_dest): - new_files.append((src['destination'], file_dest)) + new_files.append((src.get('destination', '.'), file_dest)) self.progress('.. attempting to fetch %s' % basename) try: with open(file_dest, 'wb') as raw_file, \ |