Skip to content

Commit

Permalink
adding GOPROXY and GOSUBMDB in script
Browse files Browse the repository at this point in the history
Signed-off-by: Kallol Roy <[email protected]>
  • Loading branch information
kalroy committed Oct 15, 2024
1 parent 8ba8a81 commit 008f699
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/automate-scaffolding-go/lib/scaffolding-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ do_default_build() {
tmp_bin="${CACHE_PATH}/bin"
mkdir -p "${tmp_bin}"

go_proxy="https://proxy.golang.org,direct"
gosum_db="sum.golang.org"
local go_cmd
go_cmd="GOBIN=${tmp_bin} go install"
go_cmd="GOBIN=${tmp_bin} GOPROXY=${go_proxy} GOSUMDB=${gosum_db} go install"

# Default to a static build unless the user plan has defined the
# scaffolding_go_no_static variable.
Expand All @@ -52,6 +54,7 @@ do_default_build() {

GO_LDFLAGS="${GO_LDFLAGS} -extldflags \"-fno-PIC -static\""


if [[ -z ${scaffolding_go_build_tags} ]]; then
declare -a scaffolding_go_build_tags=()
fi
Expand Down

0 comments on commit 008f699

Please sign in to comment.