Skip to content

Commit a300d79

Browse files
committed
release
1 parent 2c301ef commit a300d79

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

metablock/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .spaces import Block, Service, Space, SpaceExtension
66
from .user import User
77

8-
__version__ = "1.0.0"
8+
__version__ = "1.0.1"
99

1010
__all__ = [
1111
"Metablock",

metablock/cli.py

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
METABLOCK_SPACE = os.environ.get("METABLOCK_SPACE", "")
1212
METABLOCK_ENV = os.environ.get("METABLOCK_ENV", "prod")
13+
METABLOCK_NAME = os.environ.get("METABLOCK_NAME", "shipped from metablock-py")
1314
METABLOCK_BLOCK_ID = os.environ.get("METABLOCK_BLOCK_ID", "")
1415
METABLOCK_API_TOKEN = os.environ.get("METABLOCK_API_TOKEN", "")
1516

@@ -32,11 +33,19 @@ def main() -> None:
3233
default=METABLOCK_SPACE,
3334
show_default=True,
3435
)
35-
@click.option("--token", help="metablock API token", default=METABLOCK_API_TOKEN)
36+
@click.option(
37+
"--token",
38+
help="metablock API token",
39+
default=METABLOCK_API_TOKEN,
40+
)
3641
def apply(path: str, space_name: str, token: str) -> None:
3742
"""Apply metablock manifest to a metablock space"""
3843
asyncio.get_event_loop().run_until_complete(
39-
_apply(path, space_name or METABLOCK_SPACE, token or METABLOCK_API_TOKEN)
44+
_apply(
45+
path,
46+
space_name or METABLOCK_SPACE,
47+
token or METABLOCK_API_TOKEN,
48+
)
4049
)
4150

4251

@@ -58,14 +67,30 @@ def apply(path: str, space_name: str, token: str) -> None:
5867
@click.option(
5968
"--name",
6069
help="Optional deployment name",
61-
default="shipped from metablock-py",
70+
default=METABLOCK_NAME,
6271
show_default=True,
6372
)
64-
@click.option("--token", help="metablock API token", default=METABLOCK_API_TOKEN)
65-
def ship(path: str, env: str, block_id: str, name: str, token: str) -> None:
73+
@click.option(
74+
"--token",
75+
help="metablock API token",
76+
default=METABLOCK_API_TOKEN,
77+
)
78+
def ship(
79+
path: str,
80+
env: str,
81+
block_id: str,
82+
name: str,
83+
token: str,
84+
) -> None:
6685
"""Deploy a new version of html block"""
6786
asyncio.get_event_loop().run_until_complete(
68-
_ship(path, env, block_id, name, token or METABLOCK_API_TOKEN)
87+
_ship(
88+
path,
89+
env or METABLOCK_ENV,
90+
block_id or METABLOCK_BLOCK_ID,
91+
name or METABLOCK_NAME,
92+
token or METABLOCK_API_TOKEN,
93+
)
6994
)
7095

7196

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "metablock"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
description = "Metablock cloud python client"
55
authors = ["Luca <[email protected]>"]
66
license = "BSD"

0 commit comments

Comments
 (0)