Skip to content

Commit

Permalink
Revert "Implement 'project-path' for the load-cache and save-cache co…
Browse files Browse the repository at this point in the history
…mmands (…" (#96)

This reverts commit 97ff7e4.
  • Loading branch information
brentmmarks authored Dec 13, 2024
1 parent 97ff7e4 commit 6ed27bc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 42 deletions.
8 changes: 1 addition & 7 deletions src/commands/load-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ parameters:
description: "User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
type: string
default: ""
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- restore_cache:
keys:
- v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
- v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
8 changes: 1 addition & 7 deletions src/commands/load-golangci-lint-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ parameters:
description: "User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
type: string
default: ""
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- restore_cache:
keys:
- v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
- v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
8 changes: 1 addition & 7 deletions src/commands/load-mod-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ parameters:
description: "User-configurable component for cache key. Useful for avoiding collisions in complex workflows."
type: string
default: ""
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- restore_cache:
keys:
- v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}
- v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}
8 changes: 1 addition & 7 deletions src/commands/save-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ parameters:
description: "Path to cache."
type: string
default: "/home/circleci/.cache/go-build"
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- save_cache:
key: v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
key: v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
paths:
- << parameters.path >>
9 changes: 2 additions & 7 deletions src/commands/save-golangci-lint-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ parameters:
description: "Path to cache."
type: string
default: "/home/circleci/.cache/golangci-lint"
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- save_cache:
key: v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}-{{ epoch | round "72h" }}
key: v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}
paths:
- << parameters.path >>

8 changes: 1 addition & 7 deletions src/commands/save-mod-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ parameters:
type: string
# /home/circleci/go is the GOPATH in the cimg/go Docker image
default: "/home/circleci/go/pkg/mod"
project-path:
description: |
The path to the directory containing your Go project files: go.mod, go.sum.
Defaults to $CIRCLE_WORKING_DIRECTORY.
type: string
default: $CIRCLE_WORKING_DIRECTORY
steps:
- save_cache:
key: v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "<< parameters.project-path >>/go.sum" }}
key: v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}
paths:
- << parameters.path >>

0 comments on commit 6ed27bc

Please sign in to comment.