File tree Expand file tree Collapse file tree 6 files changed +42
-7
lines changed
Expand file tree Collapse file tree 6 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ parameters:
44 description : " User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
55 type : string
66 default : " "
7+ project-path :
8+ description : |
9+ The path to the directory containing your Go project files: go.mod, go.sum.
10+ Defaults to $CIRCLE_WORKING_DIRECTORY.
11+ type : string
12+ default : $CIRCLE_WORKING_DIRECTORY
713steps :
814 - restore_cache :
915 keys :
10- - v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
16+ - v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}-{{ epoch | round "72h" }}
Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ parameters:
44 description : " User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
55 type : string
66 default : " "
7+ project-path :
8+ description : |
9+ The path to the directory containing your Go project files: go.mod, go.sum.
10+ Defaults to $CIRCLE_WORKING_DIRECTORY.
11+ type : string
12+ default : $CIRCLE_WORKING_DIRECTORY
713steps :
814 - restore_cache :
915 keys :
10- - v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
16+ - v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}-{{ epoch | round "72h" }}
Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ parameters:
44 description : " User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
55 type : string
66 default : " "
7+ project-path :
8+ description : |
9+ The path to the directory containing your Go project files: go.mod, go.sum.
10+ Defaults to $CIRCLE_WORKING_DIRECTORY.
11+ type : string
12+ default : $CIRCLE_WORKING_DIRECTORY
713steps :
814 - restore_cache :
915 keys :
10- - v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}
16+ - v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}
Original file line number Diff line number Diff line change @@ -8,8 +8,14 @@ parameters:
88 description : " Path to cache."
99 type : string
1010 default : " /home/circleci/.cache/go-build"
11+ project-path :
12+ description : |
13+ The path to the directory containing your Go project files: go.mod, go.sum.
14+ Defaults to $CIRCLE_WORKING_DIRECTORY.
15+ type : string
16+ default : $CIRCLE_WORKING_DIRECTORY
1117steps :
1218 - save_cache :
13- key : v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
19+ key : v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}-{{ epoch | round "72h" }}
1420 paths :
1521 - << parameters.path >>
Original file line number Diff line number Diff line change @@ -8,9 +8,14 @@ parameters:
88 description : " Path to cache."
99 type : string
1010 default : " /home/circleci/.cache/golangci-lint"
11+ project-path :
12+ description : |
13+ The path to the directory containing your Go project files: go.mod, go.sum.
14+ Defaults to $CIRCLE_WORKING_DIRECTORY.
15+ type : string
16+ default : $CIRCLE_WORKING_DIRECTORY
1117steps :
1218 - save_cache :
13- key : v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
19+ key : v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}-{{ epoch | round "72h" }}
1420 paths :
1521 - << parameters.path >>
16-
Original file line number Diff line number Diff line change @@ -9,8 +9,14 @@ parameters:
99 type : string
1010 # /home/circleci/go is the GOPATH in the cimg/go Docker image
1111 default : " /home/circleci/go/pkg/mod"
12+ project-path :
13+ description : |
14+ The path to the directory containing your Go project files: go.mod, go.sum.
15+ Defaults to $CIRCLE_WORKING_DIRECTORY.
16+ type : string
17+ default : $CIRCLE_WORKING_DIRECTORY
1218steps :
1319 - save_cache :
14- key : v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}
20+ key : v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/ go.sum" }}
1521 paths :
1622 - << parameters.path >>
You can’t perform that action at this time.
0 commit comments