pulumi/scripts/go-update.sh

18 lines
391 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT=$(git rev-parse --show-toplevel)
echo "$ROOT"
# See: https://www.shellcheck.net/wiki/SC2044
find "$ROOT" -mindepth 3 -name 'go.mod' -print0 | while IFS= read -r -d '' f
do
(
cd "$(dirname $f)"
go get -u github.com/pulumi/pulumi/sdk/v3
go get -u github.com/pulumi/pulumi/pkg/v3
go mod tidy -go=1.18
)
done