fix: 0 warnings build and rename package to mcp-mt5-quant
This commit is contained in:
@@ -10,7 +10,7 @@ PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|||||||
cd "$PROJECT_ROOT"
|
cd "$PROJECT_ROOT"
|
||||||
|
|
||||||
VERSION=$(grep -E '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
|
VERSION=$(grep -E '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
|
||||||
echo "=== Building MT5-Quant v${VERSION} ==="
|
echo "=== Building MCP-MT5-Quant v${VERSION} ==="
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Clean previous builds
|
# Clean previous builds
|
||||||
@@ -19,7 +19,7 @@ mkdir -p "$PROJECT_ROOT/dist"
|
|||||||
|
|
||||||
# Build current platform
|
# Build current platform
|
||||||
echo "Building for current platform..."
|
echo "Building for current platform..."
|
||||||
cargo build --release
|
RUSTFLAGS="-D warnings" cargo build --release
|
||||||
|
|
||||||
# Detect platform
|
# Detect platform
|
||||||
UNAME=$(uname -s)
|
UNAME=$(uname -s)
|
||||||
@@ -33,7 +33,7 @@ else
|
|||||||
PLATFORM="unknown"
|
PLATFORM="unknown"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PACKAGE_NAME="mt5-quant-${PLATFORM}"
|
PACKAGE_NAME="mcp-mt5-quant-${PLATFORM}"
|
||||||
PACKAGE_DIR="$PROJECT_ROOT/dist/${PACKAGE_NAME}"
|
PACKAGE_DIR="$PROJECT_ROOT/dist/${PACKAGE_NAME}"
|
||||||
|
|
||||||
echo "Packaging for ${PLATFORM}..."
|
echo "Packaging for ${PLATFORM}..."
|
||||||
@@ -59,6 +59,7 @@ echo ""
|
|||||||
echo "=== Build Complete ==="
|
echo "=== Build Complete ==="
|
||||||
echo ""
|
echo ""
|
||||||
echo "Package: dist/${PACKAGE_NAME}.tar.gz"
|
echo "Package: dist/${PACKAGE_NAME}.tar.gz"
|
||||||
|
echo "Binary: mt5-quant"
|
||||||
echo "Size: $(du -h "${PACKAGE_NAME}.tar.gz" | cut -f1)"
|
echo "Size: $(du -h "${PACKAGE_NAME}.tar.gz" | cut -f1)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Contents:"
|
echo "Contents:"
|
||||||
@@ -67,4 +68,5 @@ echo ""
|
|||||||
echo "To install:"
|
echo "To install:"
|
||||||
echo " tar -xzf ${PACKAGE_NAME}.tar.gz"
|
echo " tar -xzf ${PACKAGE_NAME}.tar.gz"
|
||||||
echo " cd ${PACKAGE_NAME}"
|
echo " cd ${PACKAGE_NAME}"
|
||||||
echo " ./mt5-quant --help"
|
echo " sudo cp mt5-quant /usr/local/bin/"
|
||||||
|
echo " mt5-quant --help"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use crate::{models::Config as ModelsConfig, tools::ToolHandler, McpError, McpReq
|
|||||||
|
|
||||||
/// Auto-verify result stored after first initialization
|
/// Auto-verify result stored after first initialization
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
struct AutoVerifyResult {
|
struct AutoVerifyResult {
|
||||||
all_ok: bool,
|
all_ok: bool,
|
||||||
hint: String,
|
hint: String,
|
||||||
@@ -89,6 +90,7 @@ impl McpServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get current verify status (may be loading if called immediately after init)
|
/// Get current verify status (may be loading if called immediately after init)
|
||||||
|
#[allow(dead_code)]
|
||||||
async fn get_verify_status(&self) -> (Option<bool>, String) {
|
async fn get_verify_status(&self) -> (Option<bool>, String) {
|
||||||
let guard = self.auto_verify_result.lock().await;
|
let guard = self.auto_verify_result.lock().await;
|
||||||
match guard.as_ref() {
|
match guard.as_ref() {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
|
||||||
use crate::compile::MqlCompiler;
|
use crate::compile::MqlCompiler;
|
||||||
use crate::models::Config;
|
use crate::models::Config;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
|
||||||
use crate::models::Config;
|
use crate::models::Config;
|
||||||
|
|
||||||
pub async fn handle_read_set_file(args: &Value) -> Result<Value> {
|
pub async fn handle_read_set_file(args: &Value) -> Result<Value> {
|
||||||
|
|||||||
Reference in New Issue
Block a user