diff options
| -rw-r--r-- | deploy.ps1 | 27 | ||||
| -rwxr-xr-x | deploy.sh | 15 |
2 files changed, 26 insertions, 16 deletions
@@ -5,6 +5,13 @@ $scriptPath = $MyInvocation.MyCommand.Path $scriptDir = Split-Path $scriptPath -Parent Set-Location $scriptDir +# Check for ISCC +$isccPath = Get-Command ISCC -ErrorAction SilentlyContinue +if (-not $isccPath) { + Write-Warning '"Inno Setup" not installed. (https://jrsoftware.org/isinfo.php)' + exit 1 +} + # Check if core library exists $coreLibPath = "..\VersionControl\" if (-not (Test-Path $coreLibPath)) { @@ -13,14 +20,16 @@ if (-not (Test-Path $coreLibPath)) { } # Test core library -cargo test --manifest-path ..\VersionControl\Cargo.toml --workspace +Write-Host "Testing Core Library `".\..\VersionControl\Cargo.toml`"" +cargo test --manifest-path ..\VersionControl\Cargo.toml --workspace --quiet if ($LASTEXITCODE -ne 0) { Write-Warning "Core library tests failed. Aborting build." exit 1 } # Test workspace -cargo test --workspace +Write-Host "Testing Command Line `".\Cargo.toml`"" +cargo test --workspace --quiet if ($LASTEXITCODE -ne 0) { Write-Warning "Workspace tests failed. Aborting build." exit 1 @@ -42,23 +51,19 @@ if ($coreGitStatus) { exit 1 } -# Check for ISCC -$isccPath = Get-Command ISCC -ErrorAction SilentlyContinue -if (-not $isccPath) { - Write-Warning '"Inno Setup" not installed. (https://jrsoftware.org/isinfo.php)' - exit 1 -} - # Build $env:FORCE_BUILD=$(Get-Date -Format 'mmss') -cargo build --workspace --release +Write-Host "Building `".\Cargo.toml`"" +cargo build --workspace --release --quiet if ($LASTEXITCODE -ne 0) { # Build failed } else { # Build succeeded # Export - if (cargo run --manifest-path tools/build_helper/Cargo.toml --bin exporter release) { + Write-Host "Deploying `".\.cargo\config.toml`"" + if (cargo run --manifest-path tools/build_helper/Cargo.toml --quiet --bin exporter release) { Copy-Item -Path templates\compile_info.rs.template -Destination src\data\compile_info.rs -Force + Write-Host "Packing Installer `".\setup\windows\setup_jv_cli.iss`"" ISCC /Q .\setup\windows\setup_jv_cli.iss } } @@ -13,14 +13,16 @@ if [ ! -d "$coreLibPath" ]; then fi # Test core library -cargo test --manifest-path ../VersionControl/Cargo.toml --workspace +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 -cargo test --workspace +echo "Testing Command Line \"./Cargo.toml\"" +cargo test --workspace --quiet if [ $? -ne 0 ]; then echo "Workspace tests failed. Aborting build." exit 1 @@ -43,10 +45,13 @@ if [ -n "$core_git_status" ]; then fi # Build -if FORCE_BUILD=$(date +%s) cargo build --workspace --release; then +echo "Building \"./Cargo.toml\"" +if FORCE_BUILD=$(date +%s) cargo build --workspace --release --quiet; then + # Build succeeded # Export - if cargo run --manifest-path tools/build_helper/Cargo.toml --bin exporter release; then + 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 src/data/compile_info.rs + cp -f templates/compile_info.rs.template src/data/compile_info.rs fi fi |
