Skip to content

Commit

Permalink
fixed makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmanno committed Nov 19, 2021
1 parent 00b56d8 commit 4fc63b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 12 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ archives:
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this is a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# If you want to manually examine the release before its live, uncomment this line:
draft: true
Expand Down
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TEST?=$$(go list ./... | grep -v 'vendor')
HOSTNAME=facile.it
HOSTNAME=hashicorp.com
NAMESPACE=alexmanno
NAME=harbor
BINARY=terraform-provider-${NAME}
Expand All @@ -16,25 +16,16 @@ release:
-v $(PWD):/go/src/github.com/$(NAMESPACE)/$(BINARY) \
-w /go/src/github.com/$(NAMESPACE)/$(BINARY) \
-e GITHUB_TOKEN \
-e GPG_FINGERPRINT \
goreleaser/goreleaser release --rm-dist

# -v /var/run/docker.sock:/var/run/docker.sock
# -e GITHUB_TOKEN --privileged

pre-release:
docker run --rm \
-v $(PWD):/go/src/github.com/$(NAMESPACE)/$(BINARY) \
-w /go/src/github.com/$(NAMESPACE)/$(BINARY) \
goreleaser/goreleaser release --snapshot --rm-dist

pre-build:
docker run --rm --privileged \
-v $(PWD):/go/src/github.com/$(NAMESPACE)/$(BINARY) \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/$(NAMESPACE)/$(BINARY) \
-e GITHUB_TOKEN \
goreleaser/goreleaser build --single-target

install: build
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
Expand Down

0 comments on commit 4fc63b8

Please sign in to comment.