airobo 0.1.7__tar.gz → 0.1.8__tar.gz
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-0.1.7 → airobo-0.1.8}/PKG-INFO +1 -1
- airobo-0.1.8/airobo/api.py +64 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo.egg-info/PKG-INFO +1 -1
- {airobo-0.1.7 → airobo-0.1.8}/pyproject.toml +1 -1
- airobo-0.1.7/airobo/api.py +0 -53
- {airobo-0.1.7 → airobo-0.1.8}/airobo/__init__.py +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo/cli.py +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo/modules/publishAndroid.py +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo/modules/publishIOS.py +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo.egg-info/SOURCES.txt +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo.egg-info/dependency_links.txt +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo.egg-info/entry_points.txt +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/airobo.egg-info/top_level.txt +0 -0
- {airobo-0.1.7 → airobo-0.1.8}/setup.cfg +0 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
"""
|
2
|
+
API callbacks!
|
3
|
+
"""
|
4
|
+
import os
|
5
|
+
import re
|
6
|
+
|
7
|
+
# Declarations / modules
|
8
|
+
from airobo.modules import publishAndroid
|
9
|
+
from airobo.modules import publishIOS
|
10
|
+
|
11
|
+
# ======================================================================================
|
12
|
+
|
13
|
+
"""
|
14
|
+
Simulate publishing something.
|
15
|
+
"""
|
16
|
+
def publish(plat=None):
|
17
|
+
if plat != "ios" and plat != "android" and plat != None:
|
18
|
+
return "Supply a valid platform type!"
|
19
|
+
if plat == "ios":
|
20
|
+
publishIOS()
|
21
|
+
elif plat == "android":
|
22
|
+
publishAndroid()
|
23
|
+
else: #default : publish all.
|
24
|
+
publishIOS()
|
25
|
+
publishAndroid()
|
26
|
+
|
27
|
+
#----------------------------------------
|
28
|
+
|
29
|
+
"""
|
30
|
+
Get version from pyproject.toml
|
31
|
+
"""
|
32
|
+
def version():
|
33
|
+
try:
|
34
|
+
# First try to get the directory where this file is located
|
35
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
36
|
+
|
37
|
+
# Try multiple possible locations for pyproject.toml
|
38
|
+
possible_paths = [
|
39
|
+
# In development: go up one level from airobo/ to project root
|
40
|
+
os.path.join(os.path.dirname(current_dir), 'pyproject.toml'),
|
41
|
+
# Alternative: same directory as this file
|
42
|
+
os.path.join(current_dir, 'pyproject.toml'),
|
43
|
+
# Alternative: current working directory
|
44
|
+
os.path.join(os.getcwd(), 'pyproject.toml')
|
45
|
+
]
|
46
|
+
|
47
|
+
for toml_path in possible_paths:
|
48
|
+
if os.path.exists(toml_path):
|
49
|
+
with open(toml_path, 'r') as f:
|
50
|
+
content = f.read()
|
51
|
+
# Extract version using regex
|
52
|
+
version_match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
|
53
|
+
if version_match:
|
54
|
+
print(version_match.group(1))
|
55
|
+
return
|
56
|
+
|
57
|
+
# If no file found, fallback
|
58
|
+
print("0.1.7") # Use current known version as fallback
|
59
|
+
except Exception as e:
|
60
|
+
# Fallback on any error
|
61
|
+
print("0.1.7")
|
62
|
+
except Exception:
|
63
|
+
# Fallback on any error
|
64
|
+
print("1337")
|
airobo-0.1.7/airobo/api.py
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
API callbacks!
|
3
|
-
"""
|
4
|
-
import os
|
5
|
-
import re
|
6
|
-
|
7
|
-
# Declarations / modules
|
8
|
-
from airobo.modules import publishAndroid
|
9
|
-
from airobo.modules import publishIOS
|
10
|
-
|
11
|
-
# ======================================================================================
|
12
|
-
|
13
|
-
"""
|
14
|
-
Simulate publishing something.
|
15
|
-
"""
|
16
|
-
def publish(plat=None):
|
17
|
-
if plat != "ios" and plat != "android" and plat != None:
|
18
|
-
return "Supply a valid platform type!"
|
19
|
-
if plat == "ios":
|
20
|
-
publishIOS()
|
21
|
-
elif plat == "android":
|
22
|
-
publishAndroid()
|
23
|
-
else: #default : publish all.
|
24
|
-
publishIOS()
|
25
|
-
publishAndroid()
|
26
|
-
|
27
|
-
#----------------------------------------
|
28
|
-
|
29
|
-
"""
|
30
|
-
Get version from pyproject.toml
|
31
|
-
"""
|
32
|
-
def version():
|
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")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|