mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Added 'datasette publish now --force' option
This calls now with --force - which is useful as it means you get a fresh copy of datasette even if now has already cached that docker layer.
This commit is contained in:
parent
00527e5c62
commit
fc7c04fe0b
2 changed files with 7 additions and 2 deletions
|
|
@ -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
|
-n, --name TEXT Application name to use when deploying to Now
|
||||||
-m, --metadata FILENAME Path to JSON file containing metadata to publish
|
-m, --metadata FILENAME Path to JSON file containing metadata to publish
|
||||||
--extra-options TEXT Extra options to pass to datasette serve
|
--extra-options TEXT Extra options to pass to datasette serve
|
||||||
|
--force Pass --force option to now
|
||||||
--help Show this message and exit.
|
--help Show this message and exit.
|
||||||
|
|
||||||
## datasette package
|
## datasette package
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ def build(files, inspect_file):
|
||||||
help='Path to JSON file containing metadata to publish'
|
help='Path to JSON file containing metadata to publish'
|
||||||
)
|
)
|
||||||
@click.option('--extra-options', help='Extra options to pass to datasette serve')
|
@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.
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
with temporary_docker_directory(files, name, metadata, extra_options):
|
with temporary_docker_directory(files, name, metadata, extra_options):
|
||||||
call('now')
|
if force:
|
||||||
|
call(['now', '--force'])
|
||||||
|
else:
|
||||||
|
call('now')
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue