diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-24 03:56:35 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-24 04:31:03 +0800 |
| commit | 4c77a05993d40c42ebe78c1d3a72f8049f360982 (patch) | |
| tree | 81df02103be28bc88c0ff89f1857852255bdb32c /deploy.sh | |
| parent | b32a021c2d5075303f5987e702c9df83e7c365e7 (diff) | |
Move deployment scripts to scripts/dev directory
Diffstat (limited to 'deploy.sh')
| -rwxr-xr-x | deploy.sh | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index c2403cf..0000000 --- a/deploy.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -# Require : Cargo (Rust) - -# Change to the directory where the script is located -cd "$(dirname "$0")" || exit 1 - -# Check if core library exists -coreLibPath="../VersionControl/" -if [ ! -d "$coreLibPath" ]; then - echo "Core library not found at $coreLibPath. Aborting build." - exit 1 -fi - -# Test core library -echo "Testing Core Library \"../VersionControl/Cargo.toml\"" -cargo test --manifest-path ../VersionControl/Cargo.toml --workspace --quiet -if [ $? -ne 0 ]; then - echo "Core library tests failed. Aborting build." - exit 1 -fi - -# Test workspace -echo "Testing Command Line \"./Cargo.toml\"" -cargo test --workspace --quiet -if [ $? -ne 0 ]; then - echo "Workspace tests failed. Aborting build." - exit 1 -fi - -# Check if main git worktree is clean -git_status=$(git status --porcelain) -if [ -n "$git_status" ]; then - echo "Git worktree is not clean. Commit or stash changes before building." - exit 1 -fi - -# Check if core library git worktree is clean -pushd "$coreLibPath" > /dev/null -core_git_status=$(git status --porcelain) -popd > /dev/null -if [ -n "$core_git_status" ]; then - echo "Core library git worktree is not clean. Commit or stash changes before building." - exit 1 -fi - -# Build -echo "Building \"./Cargo.toml\"" -if FORCE_BUILD=$(date +%s) cargo build --workspace --release --quiet; then - # Build succeeded - # Export - echo "Deploying \"./.cargo/config.toml\"" - if cargo run --manifest-path tools/build_helper/Cargo.toml --quiet --bin exporter release; then - # Copy compile_info.rs.template to compile_info.rs after successful export - cp -f templates/compile_info.rs.template src/data/compile_info.rs - fi -fi |
