forked from contentful-labs/terraform-contentful
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathTaskfile.yml
More file actions
50 lines (41 loc) · 1.48 KB
/
Taskfile.yml
File metadata and controls
50 lines (41 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3'
dotenv: [ '.env' ]
tasks:
default:
silent: true
cmd: task --list-all
format:
cmds:
- go fmt ./...
test:
cmds:
- go test -v ./...
test-acc:
env:
TF_ACC: 1
cmds:
# Run sequentially to avoid conflicts with shared resources in Contentful.
- go test -p 1 -v ./...
generate:
cmds:
- go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=oapi-config.yaml ./openapi.yaml
- go generate ./...
build-local:
cmds:
- go build -o terraform-provider-contentful_{{ .VERSION }}
- mkdir -p ~/.terraform.d/plugins/registry.terraform.io/labd/contentful/{{ .VERSION }}/{{ .PLATFORM }}/
- mv terraform-provider-contentful_{{ .VERSION }} ~/.terraform.d/plugins/registry.terraform.io/labd/contentful/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-contentful_v{{ .VERSION }}
- cmd: codesign --deep --force -s - ~/.terraform.d/plugins/registry.terraform.io/labd/contentful/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-contentful_v{{ .VERSION }}
platforms: [ darwin ]
vars:
VERSION: 99.0.0
PLATFORM:
sh: echo "$(go env GOOS)_$(go env GOARCH)"
build:
env:
GORELEASER_CURRENT_TAG: "v0.0.0"
cmd: goreleaser build --snapshot --clean --single-target --output terraform-provider-contentful
coverage:
cmds:
- go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
- go tool cover -func=coverage.txt