kopia lustrzana https://github.com/simonw/datasette
datasette publish now --alias option
You can now use --alias to attempt to alias after you deploy. Also updated now.json to use version: 1encode-decode-table-name
rodzic
77789d0ff4
commit
07912ba46d
|
@ -21,7 +21,8 @@ def publish_subcommand(publish):
|
|||
help="Application name to use when deploying",
|
||||
)
|
||||
@click.option("--force", is_flag=True, help="Pass --force option to now")
|
||||
@click.option("--token", help="Auth token to use for deploy (Now only)")
|
||||
@click.option("--token", help="Auth token to use for deploy")
|
||||
@click.option("--alias", help="Desired alias e.g. yoursite.now.sh")
|
||||
@click.option("--spatialite", is_flag=True, help="Enable SpatialLite extension")
|
||||
def now(
|
||||
files,
|
||||
|
@ -41,6 +42,7 @@ def publish_subcommand(publish):
|
|||
name,
|
||||
force,
|
||||
token,
|
||||
alias,
|
||||
spatialite,
|
||||
):
|
||||
fail_if_publish_binary_not_installed("now", "Zeit Now", "https://zeit.co/now")
|
||||
|
@ -70,11 +72,12 @@ def publish_subcommand(publish):
|
|||
"source_url": source_url,
|
||||
},
|
||||
):
|
||||
open("now.json", "w").write(json.dumps({
|
||||
"features": {
|
||||
"cloud": "v1"
|
||||
}
|
||||
}))
|
||||
now_json = {
|
||||
"version": 1
|
||||
}
|
||||
if alias:
|
||||
now_json["alias"] = alias
|
||||
open("now.json", "w").write(json.dumps(now_json))
|
||||
args = []
|
||||
if force:
|
||||
args.append("--force")
|
||||
|
@ -84,3 +87,5 @@ def publish_subcommand(publish):
|
|||
call(["now"] + args)
|
||||
else:
|
||||
call("now")
|
||||
if alias:
|
||||
call(["now", "alias"])
|
||||
|
|
|
@ -18,6 +18,7 @@ Options:
|
|||
--source_url TEXT Source URL for metadata
|
||||
-n, --name TEXT Application name to use when deploying
|
||||
--force Pass --force option to now
|
||||
--token TEXT Auth token to use for deploy (Now only)
|
||||
--token TEXT Auth token to use for deploy
|
||||
--alias TEXT Desired alias e.g. yoursite.now.sh
|
||||
--spatialite Enable SpatialLite extension
|
||||
--help Show this message and exit.
|
||||
|
|
Ładowanie…
Reference in New Issue