From 55c849910d93d0b896b00b1abf0f14a9eae8c6cd Mon Sep 17 00:00:00 2001 From: Reinhard Naegele Date: Sat, 2 Nov 2019 17:41:49 +0100 Subject: [PATCH] Add 'go mod download' Signed-off-by: Reinhard Naegele --- .circleci/config.yml | 1 + .goreleaser.yml | 2 +- build.sh | 13 +++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa8c02a6..30688cff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,6 +32,7 @@ jobs: - run: name: Test command: | + go mod download ./e2e-kind.sh build: docker: diff --git a/.goreleaser.yml b/.goreleaser.yml index a2b3f4b0..27748a4b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,7 +1,7 @@ project_name: chart-testing before: hooks: - - go mod tidy + - go mod download builds: - main: ct/main.go binary: ct diff --git a/build.sh b/build.sh index bf4cc0a1..e4d94d9f 100755 --- a/build.sh +++ b/build.sh @@ -21,7 +21,7 @@ set -o pipefail readonly SCRIPT_DIR=$(dirname "$(readlink -f "$0")") show_help() { -cat << EOF + cat << EOF Usage: $(basename "$0") Build ct using Goreleaser. @@ -40,14 +40,14 @@ main() { while :; do case "${1:-}" in - -h|--help) + -h | --help) show_help exit ;; - -d|--debug) + -d | --debug) debug=true ;; - -r|--release) + -r | --release) release=true ;; *) @@ -61,16 +61,17 @@ main() { local goreleaser_args=(--rm-dist) if [[ -n "$debug" ]]; then - goreleaser_args+=( --debug) + goreleaser_args+=(--debug) set -x fi if [[ -z "$release" ]]; then - goreleaser_args+=( --snapshot) + goreleaser_args+=(--snapshot) fi pushd "$SCRIPT_DIR" > /dev/null + go mod download go test ./... goreleaser "${goreleaser_args[@]}"