Skip to content

Commit

Permalink
Add 'go mod download'
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Naegele <[email protected]>
  • Loading branch information
unguiculus committed Nov 2, 2019
1 parent fda737f commit 55c8499
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- run:
name: Test
command: |
go mod download
./e2e-kind.sh
build:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project_name: chart-testing
before:
hooks:
- go mod tidy
- go mod download
builds:
- main: ct/main.go
binary: ct
Expand Down
13 changes: 7 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -o pipefail
readonly SCRIPT_DIR=$(dirname "$(readlink -f "$0")")

show_help() {
cat << EOF
cat << EOF
Usage: $(basename "$0") <options>
Build ct using Goreleaser.
Expand All @@ -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
;;
*)
Expand All @@ -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[@]}"

Expand Down

0 comments on commit 55c8499

Please sign in to comment.