Skip to content

Commit 6ed27bc

Browse files
authored
Revert "Implement 'project-path' for the load-cache and save-cache commands (…" (#96)
This reverts commit 97ff7e4.
1 parent 97ff7e4 commit 6ed27bc

File tree

6 files changed

+7
-42
lines changed

6 files changed

+7
-42
lines changed

src/commands/load-build-cache.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ 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
137
steps:
148
- restore_cache:
159
keys:
16-
- v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
10+
- v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}

src/commands/load-golangci-lint-cache.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ 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
137
steps:
148
- restore_cache:
159
keys:
16-
- v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
10+
- v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}

src/commands/load-mod-cache.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ 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
137
steps:
148
- restore_cache:
159
keys:
16-
- v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}
10+
- v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}

src/commands/save-build-cache.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@ 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
1711
steps:
1812
- save_cache:
19-
key: v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
13+
key: v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
2014
paths:
2115
- << parameters.path >>

src/commands/save-golangci-lint-cache.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@ 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
1711
steps:
1812
- save_cache:
19-
key: v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
13+
key: v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
2014
paths:
2115
- << parameters.path >>
16+

src/commands/save-mod-cache.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@ 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
1812
steps:
1913
- save_cache:
20-
key: v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}
14+
key: v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}
2115
paths:
2216
- << parameters.path >>

0 commit comments

Comments
 (0)