Skip to content

Commit 4e602be

Browse files
[python] return deployment url
1 parent 854f76c commit 4e602be

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.8.17
4+
5+
- Support returning deployment url in deploy()
6+
37
## 2.8.16
48

59
- Support describing single files

python/hal9/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def deploy(path :str, target :str, url :str, name :str, typename :str, data :str
7979
if (name is None):
8080
name = f'{os.path.basename(path)}-{int(datetime.datetime.now().timestamp() * 1000)}'
8181

82-
api_deploy(path, target, url, name, typename, data, access, main, title, description)
82+
return api_deploy(path, target, url, name, typename, data, access, main, title, description)
8383

8484
@click.command()
8585
@click.option('--runtime', '-r', is_flag=True, help='Describe the runtimes')

python/hal9/targets/hal9.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def request_deploy(path :str, url :str, name :str, typename :str, data :str, acc
8888

8989
response_data = response.json()
9090
print(response_data['url'])
91+
return response_data['url']
9192

9293
def deploy(path :str, url :str, name :str, typename :str, data :str, access :str, main :str, title :str, description :str) -> str:
9394
if 'HAL9_TOKEN' in os.environ:
@@ -96,5 +97,5 @@ def deploy(path :str, url :str, name :str, typename :str, data :str, access :str
9697
exit(f'HAL9_TOKEN environment variable missing, see https://hal9.com/devs')
9798
# hal9_token = browser_login()
9899

99-
request_deploy(path, url, name, typename, data, access, main, title, description)
100+
return request_deploy(path, url, name, typename, data, access, main, title, description)
100101

python/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 = "hal9"
3-
version = "2.8.16"
3+
version = "2.8.17"
44
description = ""
55
authors = ["Javier Luraschi <javier@hal9.ai>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)