diff options
author | Ben Brown <ben@demerara.io> | 2022-01-19 22:14:23 +0000 |
---|---|---|
committer | Ben Brown <ben@demerara.io> | 2022-01-19 22:24:22 +0000 |
commit | e49356d5a13f58dbaeefa8608d741d295997282d (patch) | |
tree | b074c9ebd97e50a4bb1bdb60f19f119621115081 | |
parent | d5c34b55fca0868442711040adb6e5cda9cde653 (diff) | |
download | lorry-e49356d5a13f58dbaeefa8608d741d295997282d.tar.gz |
Add support for storing raw files at the repository root
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | lorry.raw-file-importer | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -289,8 +289,10 @@ will be tagged as 'bkai00mp.ttf') 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. +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. { "raw-file-repo": { diff --git a/lorry.raw-file-importer b/lorry.raw-file-importer index de35e58..968193a 100755 --- a/lorry.raw-file-importer +++ b/lorry.raw-file-importer @@ -60,7 +60,7 @@ def commit_lfs_file(raw_file, relative_path, last_commit, fast_import): # Commit the data to master commit_time = int(time.time()) basename = os.path.basename(raw_file) - path = '{}/{}'.format(relative_path, basename) + path = os.path.relpath(os.path.join(relative_path, basename)) fromline = 'from {}\n'.format(last_commit) if last_commit else '' |