-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from immutability-io/goreleaser_cross_compile
WIP: Goreleaser cross compile and resolve #2
- Loading branch information
Showing
4 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ scripts/** | |
**/.DS_Store | ||
**/helper/*.txt | ||
**/helper/SHA256SUM | ||
**/vault-ethereum | ||
**/vault-ethereum | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM vault:latest as build | ||
RUN apk add --update alpine-sdk | ||
RUN apk update && apk add go git | ||
WORKDIR /app | ||
ENV GOPATH /app | ||
ADD . /app/src | ||
RUN GO111MODULE=on go get github.com/immutability-io/vault-ethereum | ||
RUN GO111MODULE=on CGO_ENABLED=1 GOOS=linux go install -a github.com/immutability-io/vault-ethereum | ||
|
||
FROM vault:latest | ||
WORKDIR /app | ||
RUN cd /app | ||
COPY --from=build /app/bin/vault-ethereum /app/bin/vault-ethereum | ||
# Prove the binary is now an executable | ||
CMD /app/bin/vault-ethereum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- id: vault-ethereum-darwin-amd64 | ||
ldflags: -s -w -X github.com/immutability-io/vault-ethereum.Version={{.Version}} -X github.com/immutability-io/vault-ethereum.BuildDate={{.Date}} -X github.com/immutability-io/vault-ethereum.CommitHash={{ .ShortCommit }} | ||
binary: vault-ethereum_{{.Version}} | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- id: vault-ethereum-linux-amd64 | ||
ldflags: -s -w -X github.com/immutability-io/vault-ethereum/pkg/version.Version={{.Version}} -X github.com/immutability-io/vault-ethereum/pkg/version.BuildDate={{.Date}} -X github.com/immutability-io/vault-ethereum/pkg/version.CommitHash={{ .ShortCommit }} | ||
binary: vault-ethereum_{{.Version}} | ||
env: | ||
- CGO_ENABLED=1 | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- id: vault-ethereum-windows-amd64 | ||
ldflags: -s -w -X github.com/immutability-io/vault-ethereum/pkg/version.Version={{.Version}} -X github.com/immutability-io/vault-ethereum/pkg/version.BuildDate={{.Date}} -X github.com/immutability-io/vault-ethereum/pkg/version.CommitHash={{ .ShortCommit }} | ||
binary: vault-ethereum_{{.Version}} | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=x86_64-w64-mingw32-gcc | ||
- CXX=x86_64-w64-mingw32-g++ | ||
goos: | ||
- windows | ||
goarch: | ||
- amd64 | ||
archives: | ||
- format: zip | ||
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}_{{.Arch}}" | ||
files: | ||
- README.md | ||
- LICENSE | ||
|