Skip to content

Commit

Permalink
run go mod tidy with local Go toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
dbenoit17 committed Sep 19, 2023
1 parent 35be8b4 commit 9c13e49
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/create-secondary-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ replace="${1}"
if [ -n "${replace}" ]; then
echo "replace github.com/golang-fips/openssl-fips => ${replace}" >> go.mod
fi
go mod tidy
go mod vendor
../bin/go mod tidy
../bin/go mod vendor

# Generate the final patch.
git add .
Expand Down
6 changes: 6 additions & 0 deletions scripts/full-initialize-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# This script generates and applies FIPS
# patches to a Go tree.

echo "Host Go Version:"
go version

echo "Host Go Env:"
go env

SCRIPT_DIR=$(readlink -f $(dirname $0))
GO_DIR=${SCRIPT_DIR}/../go

Expand Down
6 changes: 6 additions & 0 deletions scripts/setup-initial-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ shift $((OPTIND-1))
cd ./go
ORIGINAL_GIT_SHA=$(git rev-parse HEAD)

# Build the Go toolchain before applying patches. This allows us to use this toolchain in later steps
# when running `go mod` commands.
pushd ./src
./make.bash
popd

"${ROOT}"/scripts/apply-initial-patch.sh
"${ROOT}"/scripts/create-secondary-patch.sh "${replacement}"

Expand Down

0 comments on commit 9c13e49

Please sign in to comment.