mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
2bbe9ca34a
commit
ff2fb573cd
1 changed files with 3 additions and 2 deletions
|
|
@ -27,7 +27,8 @@ def build_metadata(files, metadata):
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.argument('files', type=click.Path(exists=True), nargs=-1)
|
@click.argument('files', type=click.Path(exists=True), nargs=-1)
|
||||||
def publish(files):
|
@click.option('-n', '--name', default='datasette')
|
||||||
|
def publish(files, name):
|
||||||
if not shutil.which('now'):
|
if not shutil.which('now'):
|
||||||
click.secho(
|
click.secho(
|
||||||
' The publish command requires "now" to be installed and configured ',
|
' The publish command requires "now" to be installed and configured ',
|
||||||
|
|
@ -40,7 +41,7 @@ def publish(files):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
tmp = tempfile.TemporaryDirectory()
|
tmp = tempfile.TemporaryDirectory()
|
||||||
# We create a datasette folder in there to get a nicer now deploy name
|
# We create a datasette folder in there to get a nicer now deploy name
|
||||||
datasette_dir = os.path.join(tmp.name, 'datasette')
|
datasette_dir = os.path.join(tmp.name, name)
|
||||||
os.mkdir(datasette_dir)
|
os.mkdir(datasette_dir)
|
||||||
saved_cwd = os.getcwd()
|
saved_cwd = os.getcwd()
|
||||||
file_paths = [
|
file_paths = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue