diff --git a/README.md b/README.md index da52600d..d4bd2773 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ This will create a docker image containing both the datasette application and th -n, --name TEXT Application name to use when deploying to Now -m, --metadata FILENAME Path to JSON file containing metadata to publish --extra-options TEXT Extra options to pass to datasette serve + --force Pass --force option to now --help Show this message and exit. ## datasette package diff --git a/datasette/cli.py b/datasette/cli.py index 3f1f63cc..eafde872 100644 --- a/datasette/cli.py +++ b/datasette/cli.py @@ -37,7 +37,8 @@ def build(files, inspect_file): help='Path to JSON file containing metadata to publish' ) @click.option('--extra-options', help='Extra options to pass to datasette serve') -def publish(publisher, files, name, metadata, extra_options): +@click.option('--force', is_flag=True, help='Pass --force option to now') +def publish(publisher, files, name, metadata, extra_options, force): """ Publish specified SQLite database files to the internet along with a datasette API. @@ -58,7 +59,10 @@ def publish(publisher, files, name, metadata, extra_options): sys.exit(1) with temporary_docker_directory(files, name, metadata, extra_options): - call('now') + if force: + call(['now', '--force']) + else: + call('now') @cli.command()