mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
datasette publish now --token=X argument
Lets you specify the auth token to use when deploying to Now. Tokens can be created at https://zeit.co/account/tokens
This commit is contained in:
parent
6a32df334d
commit
538565de3a
2 changed files with 9 additions and 1 deletions
|
|
@ -174,6 +174,7 @@ This will create a docker image containing both the datasette application and th
|
||||||
--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
|
--force Pass --force option to now
|
||||||
--branch TEXT Install datasette from a GitHub branch e.g. master
|
--branch TEXT Install datasette from a GitHub branch e.g. master
|
||||||
|
--token TEXT Auth token to use for deploy (Now only)
|
||||||
--template-dir DIRECTORY Path to directory containing custom templates
|
--template-dir DIRECTORY Path to directory containing custom templates
|
||||||
--plugins-dir DIRECTORY Path to directory containing custom plugins
|
--plugins-dir DIRECTORY Path to directory containing custom plugins
|
||||||
--static STATIC MOUNT mountpoint:path-to-directory for serving static
|
--static STATIC MOUNT mountpoint:path-to-directory for serving static
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ def inspect(files, inspect_file, sqlite_extensions):
|
||||||
@click.option("--extra-options", help="Extra options to pass to datasette serve")
|
@click.option("--extra-options", help="Extra options to pass to datasette serve")
|
||||||
@click.option("--force", is_flag=True, help="Pass --force option to now")
|
@click.option("--force", is_flag=True, help="Pass --force option to now")
|
||||||
@click.option("--branch", help="Install datasette from a GitHub branch e.g. master")
|
@click.option("--branch", help="Install datasette from a GitHub branch e.g. master")
|
||||||
|
@click.option("--token", help="Auth token to use for deploy (Now only)")
|
||||||
@click.option(
|
@click.option(
|
||||||
"--template-dir",
|
"--template-dir",
|
||||||
type=click.Path(exists=True, file_okay=False, dir_okay=True),
|
type=click.Path(exists=True, file_okay=False, dir_okay=True),
|
||||||
|
|
@ -148,6 +149,7 @@ def publish(
|
||||||
extra_options,
|
extra_options,
|
||||||
force,
|
force,
|
||||||
branch,
|
branch,
|
||||||
|
token,
|
||||||
template_dir,
|
template_dir,
|
||||||
plugins_dir,
|
plugins_dir,
|
||||||
static,
|
static,
|
||||||
|
|
@ -200,8 +202,13 @@ def publish(
|
||||||
spatialite,
|
spatialite,
|
||||||
extra_metadata,
|
extra_metadata,
|
||||||
):
|
):
|
||||||
|
args = []
|
||||||
if force:
|
if force:
|
||||||
call(["now", "--force"])
|
args.append("--force")
|
||||||
|
if token:
|
||||||
|
args.append("--token={}".format(token))
|
||||||
|
if args:
|
||||||
|
call(["now"] + args)
|
||||||
else:
|
else:
|
||||||
call("now")
|
call("now")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue