mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
- Fix lint script sorting issue with LC_ALL=C locale - Remove pebbledb direct dependency (use string constant) - Add ci_setup.sh script to handle local replace directives - Update CI workflow to use ci_setup.sh - Add comprehensive CI_BUILD_GUIDE.md documentation The go.mod replace directives pointing to local directories now work for both local development and CI environments.
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# CI Setup Script for LUX EVM Module
|
|
# This script prepares the module for CI builds by removing local replace directives
|
|
|
|
set -e
|
|
|
|
echo "=== CI Setup for LUX EVM Module ==="
|
|
|
|
# Check if we're in the right directory
|
|
if [ ! -f "go.mod" ]; then
|
|
echo "Error: go.mod not found. Please run this script from the evm directory."
|
|
exit 1
|
|
fi
|
|
|
|
# Backup original go.mod
|
|
echo "Backing up go.mod..."
|
|
cp go.mod go.mod.backup
|
|
|
|
# Remove local replace directives (keep tablewriter replace)
|
|
echo "Removing local replace directives..."
|
|
sed -i '/replace.*\.\.\/.*$/d' go.mod
|
|
sed -i '/replace.*\/home\/.*$/d' go.mod
|
|
|
|
# Show what's left in replace directives
|
|
echo "Remaining replace directives:"
|
|
grep "^replace" go.mod || echo " (none except commented ones)"
|
|
|
|
# Download dependencies
|
|
echo "Downloading dependencies..."
|
|
go mod download
|
|
|
|
# Verify the module
|
|
echo "Verifying module..."
|
|
go mod verify || true
|
|
|
|
echo ""
|
|
echo "=== CI Setup Complete ==="
|
|
echo ""
|
|
echo "You can now build with:"
|
|
echo " go build \$(go list ./... | grep -v '/tests' | grep -v '/examples')"
|
|
echo ""
|
|
echo "Or run tests with:"
|
|
echo " go test \$(go list ./... | grep -v '/tests' | grep -v '/examples')"
|
|
echo ""
|
|
echo "To restore original go.mod:"
|
|
echo " mv go.mod.backup go.mod" |