aap-utils 0.2.10__py3-none-any.whl → 0.2.12__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.
- aap_utils/cli.py +5 -14
- {aap_utils-0.2.10.dist-info → aap_utils-0.2.12.dist-info}/METADATA +1 -1
- aap_utils-0.2.12.dist-info/RECORD +8 -0
- aap_utils-0.2.10.dist-info/RECORD +0 -8
- {aap_utils-0.2.10.dist-info → aap_utils-0.2.12.dist-info}/WHEEL +0 -0
- {aap_utils-0.2.10.dist-info → aap_utils-0.2.12.dist-info}/entry_points.txt +0 -0
- {aap_utils-0.2.10.dist-info → aap_utils-0.2.12.dist-info}/top_level.txt +0 -0
aap_utils/cli.py
CHANGED
@@ -23,17 +23,8 @@ def validate_image_name(image_name):
|
|
23
23
|
return bool(re.fullmatch(r'[a-z0-9_]+', image_name))
|
24
24
|
|
25
25
|
def validate_tags(tags):
|
26
|
-
"""Validate
|
27
|
-
|
28
|
-
|
29
|
-
if not tag_list:
|
30
|
-
return None # No valid tags
|
31
|
-
|
32
|
-
for tag in tag_list:
|
33
|
-
if not re.fullmatch(r'[a-z0-9_]+', tag):
|
34
|
-
return None # Found an invalid tag
|
35
|
-
|
36
|
-
return list(tag_list) # Convert back to list before returning
|
26
|
+
"""Validate tag format: lowercase, only alphanumeric and underscores."""
|
27
|
+
return bool(re.fullmatch(r'[a-z0-9_]+', tags))
|
37
28
|
|
38
29
|
def get_username():
|
39
30
|
"""Retrieve the username from the environment variable KERNEL_AP_USER or use 'unname'."""
|
@@ -63,11 +54,11 @@ def publish_env():
|
|
63
54
|
print("Invalid image name. Use only lowercase letters, numbers, or underscores (_).")
|
64
55
|
|
65
56
|
while True:
|
66
|
-
tags = input("Enter
|
57
|
+
tags = input("Enter tag (only 1 tag accepted): ").strip()
|
67
58
|
formatted_tags = validate_tags(tags)
|
68
59
|
if formatted_tags:
|
69
60
|
break
|
70
|
-
print("Invalid
|
61
|
+
print("Invalid tag. Each tag must be lowercase, contain only letters, numbers, or underscores (_), and have no spaces.")
|
71
62
|
|
72
63
|
data = {
|
73
64
|
"username": username,
|
@@ -77,7 +68,7 @@ def publish_env():
|
|
77
68
|
"pod": pod
|
78
69
|
}
|
79
70
|
|
80
|
-
print(f"Publishing environment: {username}/{image_name}:{
|
71
|
+
print(f"Publishing environment: {username}/{image_name}:{formatted_tags}")
|
81
72
|
|
82
73
|
if is_debug_mode():
|
83
74
|
print(f"🔍 DEBUG: Sending data to API: {data}")
|
@@ -0,0 +1,8 @@
|
|
1
|
+
aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
|
2
|
+
aap_utils/cli.py,sha256=huJPFlIHhi1BJoUX8kajtoNpQb4e5N5a4-Th3jXWfzg,3568
|
3
|
+
aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
|
4
|
+
aap_utils-0.2.12.dist-info/METADATA,sha256=ITmdF1Ukg3DcSpMG6rDeeHCWDO19gy_VqY3dtJVQO9I,347
|
5
|
+
aap_utils-0.2.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
aap_utils-0.2.12.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
|
7
|
+
aap_utils-0.2.12.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
8
|
+
aap_utils-0.2.12.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
|
2
|
-
aap_utils/cli.py,sha256=4Tou854Q00oZMzopGlAe4CtTOGzgPAAR2dRZCA31Wb0,3899
|
3
|
-
aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
|
4
|
-
aap_utils-0.2.10.dist-info/METADATA,sha256=11U8OVCwdVYg_rGOfCstZVUdGZiMDIWctENkcwL7tWc,347
|
5
|
-
aap_utils-0.2.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
aap_utils-0.2.10.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
|
7
|
-
aap_utils-0.2.10.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
8
|
-
aap_utils-0.2.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|