datasette publish now works with full paths

e.g. datasette publish /tmp/blah/database.db now does the right thing
pull/81/head
Simon Willison 2017-11-12 15:16:24 -08:00
rodzic efecae5a11
commit 4c66097d58
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -47,11 +47,12 @@ def publish(files):
os.path.join(saved_cwd, name)
for name in files
]
file_names = [os.path.split(f)[-1] for f in files]
try:
dockerfile = make_dockerfile(files)
dockerfile = make_dockerfile(file_names)
os.chdir(datasette_dir)
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))
call('now')
finally: