airobo 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airobo/api.py +25 -3
- {airobo-0.1.4.dist-info → airobo-0.1.6.dist-info}/METADATA +1 -1
- {airobo-0.1.4.dist-info → airobo-0.1.6.dist-info}/RECORD +6 -6
- {airobo-0.1.4.dist-info → airobo-0.1.6.dist-info}/WHEEL +0 -0
- {airobo-0.1.4.dist-info → airobo-0.1.6.dist-info}/entry_points.txt +0 -0
- {airobo-0.1.4.dist-info → airobo-0.1.6.dist-info}/top_level.txt +0 -0
airobo/api.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
"""
|
2
2
|
API callbacks!
|
3
3
|
"""
|
4
|
+
import os
|
5
|
+
import re
|
4
6
|
|
5
7
|
# Declarations / modules
|
6
8
|
from airobo.modules import publishAndroid
|
@@ -11,7 +13,7 @@ from airobo.modules import publishIOS
|
|
11
13
|
"""
|
12
14
|
Simulate publishing something.
|
13
15
|
"""
|
14
|
-
def publish(plat):
|
16
|
+
def publish(plat=None):
|
15
17
|
if plat != "ios" and plat != "android" and plat != None:
|
16
18
|
return "Supply a valid platform type!"
|
17
19
|
if plat == "ios":
|
@@ -25,7 +27,27 @@ def publish(plat):
|
|
25
27
|
#----------------------------------------
|
26
28
|
|
27
29
|
"""
|
28
|
-
|
30
|
+
Get version from pyproject.toml
|
29
31
|
"""
|
30
32
|
def version():
|
31
|
-
|
33
|
+
try:
|
34
|
+
# Get the directory where this file is located
|
35
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
36
|
+
# Go up one level to get to the project root
|
37
|
+
project_root = os.path.dirname(current_dir)
|
38
|
+
toml_path = os.path.join(project_root, 'pyproject.toml')
|
39
|
+
|
40
|
+
if os.path.exists(toml_path):
|
41
|
+
with open(toml_path, 'r') as f:
|
42
|
+
content = f.read()
|
43
|
+
# Extract version using regex
|
44
|
+
version_match = re.search(r'version\s*=\s*"([^"]+)"', content)
|
45
|
+
if version_match:
|
46
|
+
print(version_match.group(1))
|
47
|
+
return
|
48
|
+
|
49
|
+
# Fallback if file not found or version not found
|
50
|
+
print("1337")
|
51
|
+
except Exception:
|
52
|
+
# Fallback on any error
|
53
|
+
print("1337")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
airobo/__init__.py,sha256=wQC93xBJqTm_jHoO4hD_A9SP4vvVAMzOUM3vn_-bsB0,24
|
2
|
-
airobo/api.py,sha256=
|
2
|
+
airobo/api.py,sha256=dCFdAbxcKTgc6qw-Z0SqneGrD799L6AX8eU7MzcrjKA,1585
|
3
3
|
airobo/cli.py,sha256=81dIVLVrsVbJa_aZK7SNzT7dHc6aEB3jIaq4Fm5MBvo,991
|
4
4
|
airobo/modules/publishAndroid.py,sha256=D1tmKAoYlIt85MhtOyAZXiVtscxiIgzFodqbVEbU_Ok,98
|
5
5
|
airobo/modules/publishIOS.py,sha256=5HtnBejXtFNGJ719ydfKX0IO4hoJD5MlxKbmD-S7Dbg,90
|
6
|
-
airobo-0.1.
|
7
|
-
airobo-0.1.
|
8
|
-
airobo-0.1.
|
9
|
-
airobo-0.1.
|
10
|
-
airobo-0.1.
|
6
|
+
airobo-0.1.6.dist-info/METADATA,sha256=TSEUq8WIiTdWKBdRuEouPSYnJT78dXTfe_us3MXIU5g,207
|
7
|
+
airobo-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
airobo-0.1.6.dist-info/entry_points.txt,sha256=tWld-TShvEFSonDWXCvsiBq-dNOY3Qo6FI48pd1S7eE,43
|
9
|
+
airobo-0.1.6.dist-info/top_level.txt,sha256=3vchuQftD3xE45bZMuHJVTRVpiC8FKJyJwsrGAjfwKg,7
|
10
|
+
airobo-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|