mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
- Fix Windows zip command issue by using PowerShell Compress-Archive - Add Windows support for OSS upload with ossutil - Replace Chinese comments with English in build.yml - Fix bash syntax error in package_zip function - Improve code formatting and consistency - Update various configuration files for better cross-platform support Resolves Windows build failures in GitHub Actions.
39 lines
1.7 KiB
Bash
Executable File
39 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Setup test binaries for Docker build testing
|
|
# This script creates temporary binary files for testing Docker build process
|
|
|
|
set -e
|
|
|
|
echo "Setting up test binaries for Docker build..."
|
|
|
|
# Create temporary rustfs binary
|
|
./build-rustfs.sh -p x86_64-unknown-linux-gnu
|
|
|
|
# Create test directory structure
|
|
mkdir -p test-releases/server/rustfs/release/linux-amd64/archive
|
|
mkdir -p test-releases/server/rustfs/release/linux-arm64/archive
|
|
|
|
# Get version
|
|
VERSION=$(git describe --abbrev=0 --tags 2>/dev/null || git rev-parse --short HEAD)
|
|
|
|
# Copy binaries
|
|
cp target/x86_64-unknown-linux-gnu/release/rustfs test-releases/server/rustfs/release/linux-amd64/archive/rustfs.${VERSION}
|
|
cp target/x86_64-unknown-linux-gnu/release/rustfs.sha256sum test-releases/server/rustfs/release/linux-amd64/archive/rustfs.${VERSION}.sha256sum
|
|
|
|
# Create dummy signatures
|
|
echo "dummy signature" > test-releases/server/rustfs/release/linux-amd64/archive/rustfs.${VERSION}.minisig
|
|
echo "dummy signature" > test-releases/server/rustfs/release/linux-arm64/archive/rustfs.${VERSION}.minisig
|
|
|
|
# Also copy for arm64 (using same binary for testing)
|
|
cp target/aarch64-unknown-linux-gnu/release/rustfs test-releases/server/rustfs/release/linux-arm64/archive/rustfs.${VERSION}
|
|
cp target/aarch64-unknown-linux-gnu/release/rustfs.sha256sum test-releases/server/rustfs/release/linux-arm64/archive/rustfs.${VERSION}.sha256sum
|
|
|
|
echo "Test binaries created for version: ${VERSION}"
|
|
echo "You can now test Docker builds with these local binaries"
|
|
echo ""
|
|
echo "To start a local HTTP server for testing:"
|
|
echo " cd test-releases && python3 -m http.server 8000"
|
|
echo ""
|
|
echo "Then modify Dockerfile to use http://host.docker.internal:8000 instead of https://dl.rustfs.com/artifacts/rustfs"
|