mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename "datasette publish now" to "datasette publish nowv1"
Also added an alias so "datasette publish now" continues to work. Closes #472
This commit is contained in:
parent
81ba98a509
commit
7d8573d672
9 changed files with 56 additions and 40 deletions
|
|
@ -98,7 +98,16 @@ async def inspect_(files, sqlite_extensions):
|
|||
return data
|
||||
|
||||
|
||||
@cli.group()
|
||||
class PublishAliases(click.Group):
|
||||
aliases = {"now": "nowv1"}
|
||||
|
||||
def get_command(self, ctx, cmd_name):
|
||||
if cmd_name in self.aliases:
|
||||
return click.Group.get_command(self, ctx, self.aliases[cmd_name])
|
||||
return click.Group.get_command(self, ctx, cmd_name)
|
||||
|
||||
|
||||
@cli.group(cls=PublishAliases)
|
||||
def publish():
|
||||
"Publish specified SQLite database files to the internet along with a Datasette-powered interface and API"
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ def publish_subcommand(publish):
|
|||
@click.option("--token", help="Auth token to use for deploy")
|
||||
@click.option("--alias", multiple=True, help="Desired alias e.g. yoursite.now.sh")
|
||||
@click.option("--spatialite", is_flag=True, help="Enable SpatialLite extension")
|
||||
def now(
|
||||
def nowv1(
|
||||
files,
|
||||
metadata,
|
||||
extra_options,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue