mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
datasette publish now works with full paths
e.g. datasette publish /tmp/blah/database.db now does the right thing
This commit is contained in:
parent
efecae5a11
commit
4c66097d58
1 changed files with 3 additions and 2 deletions
|
|
@ -47,11 +47,12 @@ def publish(files):
|
||||||
os.path.join(saved_cwd, name)
|
os.path.join(saved_cwd, name)
|
||||||
for name in files
|
for name in files
|
||||||
]
|
]
|
||||||
|
file_names = [os.path.split(f)[-1] for f in files]
|
||||||
try:
|
try:
|
||||||
dockerfile = make_dockerfile(files)
|
dockerfile = make_dockerfile(file_names)
|
||||||
os.chdir(datasette_dir)
|
os.chdir(datasette_dir)
|
||||||
open('Dockerfile', 'w').write(dockerfile)
|
open('Dockerfile', 'w').write(dockerfile)
|
||||||
for path, filename in zip(file_paths, files):
|
for path, filename in zip(file_paths, file_names):
|
||||||
os.link(path, os.path.join(datasette_dir, filename))
|
os.link(path, os.path.join(datasette_dir, filename))
|
||||||
call('now')
|
call('now')
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue