mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
GOPRIVATE switches off the module proxy AND checksum verification together. Covering github.com/luxfi/* meant every luxfi module was fetched straight from git and trusted without verification — which is how moved tags got captured into module caches and served from them indefinitely, making the same commit build on one machine and fail on another. Nearly all of luxfi is public and on proxy.golang.org, so it belongs under normal verification. The private org is lux-private. Twelve luxfi repos are still private AND still 404 on the proxy; where a repo depends on one it is listed by name rather than by wildcard, so the exemption matches what actually needs a direct fetch. Co-authored-by: Hanzo Dev <[email protected]>
27 lines
816 B
Bash
Executable File
27 lines
816 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Setting up CI environment..."
|
|
|
|
# Display Go version
|
|
echo "Go version:"
|
|
go version
|
|
|
|
# Only genuinely-private modules bypass the proxy: everything else in luxfi is
|
|
# public, and GOPRIVATE would disable checksum verification for it.
|
|
# shellcheck disable=SC2125 # The asterisk is intentional Go module syntax, not a glob
|
|
export GOPRIVATE='github.com/lux-private/*'
|
|
export GONOSUMDB='github.com/lux-private/*'
|
|
|
|
# Configure git to use GITHUB_TOKEN for authentication
|
|
if [ -n "$GITHUB_TOKEN" ]; then
|
|
echo "Configuring git credentials..."
|
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
|
fi
|
|
|
|
# Download dependencies from published packages
|
|
echo "Downloading dependencies..."
|
|
go mod download
|
|
|
|
echo "CI environment setup complete."
|