@kepoai/cli 0.0.2 → 0.0.4
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.
- package/bin/arm64/kp +0 -0
- package/bin/arm64/version +1 -0
- package/bin/kp +7 -5
- package/bin/x86/kp +0 -0
- package/bin/x86/version +1 -0
- package/package.json +1 -1
package/bin/arm64/kp
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.4
|
package/bin/kp
CHANGED
|
@@ -42,6 +42,7 @@ fi
|
|
|
42
42
|
|
|
43
43
|
# Define CLI paths
|
|
44
44
|
kp_path="$bin_dir/$architecture_dir/kp"
|
|
45
|
+
kp_version_file="$bin_dir/$architecture_dir/version"
|
|
45
46
|
download_url="https://r2.kepo.ai/kepo-cli/$kp_version/kepo-cli-$os_lower-$download_arch"
|
|
46
47
|
|
|
47
48
|
# Function to download CLI binary
|
|
@@ -53,6 +54,7 @@ function download_cli {
|
|
|
53
54
|
exit 1
|
|
54
55
|
fi
|
|
55
56
|
chmod +x "$kp_path"
|
|
57
|
+
echo "$kp_version" > "$kp_version_file"
|
|
56
58
|
echo "Successfully downloaded CLI to $kp_path"
|
|
57
59
|
}
|
|
58
60
|
|
|
@@ -62,13 +64,13 @@ if [ "$1" == "npm-post-install" ]; then
|
|
|
62
64
|
exit 0
|
|
63
65
|
fi
|
|
64
66
|
|
|
65
|
-
# If CLI doesn't exist, download it
|
|
66
|
-
if [ ! -f "$kp_path" ]; then
|
|
67
|
+
# If CLI doesn't exist or version file is missing, download it
|
|
68
|
+
if [ ! -f "$kp_path" ] || [ ! -f "$kp_version_file" ]; then
|
|
67
69
|
download_cli
|
|
68
70
|
else
|
|
69
|
-
# Check if version is outdated
|
|
70
|
-
current_version=$("$
|
|
71
|
-
if [ "$current_version"
|
|
71
|
+
# Check if version is outdated using version file
|
|
72
|
+
current_version=$(cat "$kp_version_file" 2>/dev/null || echo "unknown")
|
|
73
|
+
if [ "$current_version" != "$kp_version" ]; then
|
|
72
74
|
echo "Updating Kepo CLI from v${current_version} to v${kp_version}..."
|
|
73
75
|
download_cli
|
|
74
76
|
fi
|
package/bin/x86/kp
ADDED
|
Binary file
|
package/bin/x86/version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.4
|