Skip to content

Commit 661d0db

Browse files
committed
fix: github action
1 parent cc7e286 commit 661d0db

File tree

3 files changed

+88
-5
lines changed

3 files changed

+88
-5
lines changed

.github/workflows/build-github-mcp-server.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ jobs:
4949
run: |
5050
mkdir -p temp
5151
cp cmd/github-mcp-server/github-mcp-server temp
52+
chmod +x temp/github-mcp-server
5253
5354
- name: Create MCP config file
5455
run: |
5556
cat > temp/mcp.json << EOF
5657
{
5758
"servers": {
5859
"github": {
59-
"command": "github-mcp-server",
60-
"args": ["stdio"],
60+
"command": "/bin/sh",
61+
"args": ["-c", "chmod +x github-mcp-server && ./github-mcp-server stdio"],
6162
"env": {
6263
"GITHUB_PERSONAL_ACCESS_TOKEN": "x"
6364
}
@@ -75,7 +76,7 @@ jobs:
7576
description = "Official GitHub MCP Server"
7677
authors = [{ name = "John Doe" }]
7778
dependencies = [
78-
"uipath-mcp==0.0.71",
79+
"uipath-mcp==0.0.74",
7980
]
8081
requires-python = ">=3.10"
8182
EOF

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "uipath-mcp"
3-
version = "0.0.71"
3+
version = "0.0.74"
44
description = "UiPath MCP SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
77
dependencies = [
88
"mcp==1.6.0",
99
"pysignalr==1.2.0",
10-
"uipath==2.0.19",
10+
"uipath==2.0.20",
1111
]
1212
classifiers = [
1313
"Development Status :: 3 - Alpha",
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import os
2+
import platform
3+
import subprocess
4+
5+
6+
def diagnose_binary(binary_path):
7+
"""Diagnose why a binary file can't be executed."""
8+
results = {}
9+
10+
# Check if file exists
11+
results["exists"] = os.path.exists(binary_path)
12+
if not results["exists"]:
13+
return f"Error: {binary_path} does not exist"
14+
15+
# Get system architecture
16+
results["system_arch"] = platform.machine()
17+
results["system_os"] = platform.system()
18+
19+
# Check file type using 'file' command
20+
try:
21+
file_output = subprocess.check_output(
22+
["file", binary_path], universal_newlines=True
23+
)
24+
results["file_type"] = file_output.strip()
25+
except subprocess.CalledProcessError:
26+
results["file_type"] = "Could not determine file type (file command failed)"
27+
except FileNotFoundError:
28+
results["file_type"] = (
29+
"Could not determine file type (file command not available)"
30+
)
31+
32+
# For Linux, check ELF header
33+
if platform.system() == "Linux":
34+
try:
35+
readelf_output = subprocess.check_output(
36+
["readelf", "-h", binary_path], universal_newlines=True
37+
)
38+
# Extract architecture from readelf output
39+
arch_line = [
40+
line for line in readelf_output.splitlines() if "Machine:" in line
41+
]
42+
if arch_line:
43+
results["binary_arch"] = arch_line[0].strip()
44+
else:
45+
results["binary_arch"] = "Could not determine binary architecture"
46+
except subprocess.CalledProcessError:
47+
results["binary_arch"] = "Not a valid ELF binary (readelf command failed)"
48+
except FileNotFoundError:
49+
results["binary_arch"] = (
50+
"Could not check ELF header (readelf command not available)"
51+
)
52+
53+
# Print summary
54+
print(f"Diagnosis for {binary_path}:")
55+
print(f"File exists: {results['exists']}")
56+
print(f"System architecture: {results['system_arch']}")
57+
print(f"System OS: {results['system_os']}")
58+
print(f"File type: {results['file_type']}")
59+
if "binary_arch" in results:
60+
print(f"Binary architecture: {results['binary_arch']}")
61+
62+
# Provide potential solution
63+
if "ELF" in results.get("file_type", "") and results["system_os"] == "Linux":
64+
if (
65+
"64-bit" in results["file_type"]
66+
and "x86-64" in results["file_type"]
67+
and results["system_arch"] != "x86_64"
68+
):
69+
return (
70+
"Error: Binary was compiled for x86_64 architecture but your system is "
71+
+ results["system_arch"]
72+
)
73+
elif (
74+
"ARM" in results.get("binary_arch", "")
75+
and "arm" not in results["system_arch"].lower()
76+
):
77+
return (
78+
"Error: Binary was compiled for ARM architecture but your system is "
79+
+ results["system_arch"]
80+
)
81+
82+
return "Binary format may be incompatible with your system. You need a version compiled specifically for your architecture and operating system."

0 commit comments

Comments
 (0)