Skip to content

Commit 54c7ed5

Browse files
authored
Use ~ for dynamic home path in caches (#106)
1 parent a8ea12b commit 54c7ed5

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/commands/save-build-cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parameters:
77
path:
88
description: "Path to cache."
99
type: string
10-
default: "/home/circleci/.cache/go-build"
10+
default: ~/.cache/go-build
1111
steps:
1212
- save_cache:
1313
key: v1-<< parameters.key >>-go-build-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parameters:
77
path:
88
description: "Path to cache."
99
type: string
10-
default: "/home/circleci/.cache/golangci-lint"
10+
default: ~/.cache/golangci-lint
1111
steps:
1212
- save_cache:
1313
key: v1-<< parameters.key >>-golangci-lint-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "go.sum" }}-{{ epoch | round "72h" }}

src/commands/save-mod-cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88
description: "Path to cache."
99
type: string
1010
# /home/circleci/go is the GOPATH in the cimg/go Docker image
11-
default: "/home/circleci/go/pkg/mod"
11+
default: ~/go/pkg/mod
1212
steps:
1313
- save_cache:
1414
key: v1-<< parameters.key >>-go-mod-{{ arch }}-{{ checksum "go.sum" }}

src/commands/with-cache.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ parameters:
1515
build-path:
1616
description: "Location of go-build cache."
1717
type: string
18-
default: "/home/circleci/.cache/go-build"
18+
default: ~/.cache/go-build
1919
mod:
2020
description: |
2121
Whether to use go module cache. If most of your dependencies are public, it is faster to use the public
@@ -25,15 +25,15 @@ parameters:
2525
mod-path:
2626
description: "Location of go module cache."
2727
type: string
28-
default: "/home/circleci/go/pkg/mod"
28+
default: ~/go/pkg/mod
2929
golangci-lint:
3030
description: "Whether to use golangci-lint cache. Useful only in steps with linting, so defaults to false."
3131
type: boolean
3232
default: false
3333
golangci-lint-path:
3434
description: "Location of golangci-lint cache."
3535
type: string
36-
default: "/home/circleci/.cache/golangci-lint"
36+
default: ~/.cache/golangci-lint
3737
steps:
3838
- when:
3939
condition: << parameters.build >>

0 commit comments

Comments
 (0)