Skip to content

Commit

Permalink
Alright, reading through the go_rules documentation and I think I may…
Browse files Browse the repository at this point in the history
… have figured out to do this.
  • Loading branch information
mitchelldavis committed Dec 31, 2018
1 parent 0995470 commit 7e1ef52
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
26 changes: 4 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,16 @@ script:
build \
--local_resources=400,1,1.0 \
--config=ci \
--platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 \
@terraform_verifier//...
- |
bazel \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
build \
--local_resources=400,1,1.0 \
--config=ci \
--platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 \
@terraform_verifier//...
- |
bazel \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
build \
--local_resources=400,1,1.0 \
--config=ci \
--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 \
@terraform_verifier//...
notifications:
email: false
deploy:
provider: releases
api_key: $github_token
file:
- "./bazel-out/darwin_amd64_stripped/hashicorp_verfier"
- "./bazel-out/linux_amd64_pure_stripped/hashicorp_verfier"
- "./bazel-out/windows_amd64_pure_stripped/hashicorp_verfier"
- "./bazel-out/darwin_amd64_pure_stripped/hashicorp_verfier_darwin_amd64"
- "./bazel-out/linux_amd64_pure_stripped/hashicorp_verfier_linux_amd64"
- "./bazel-out/windows_amd64_pure_stripped/hashicorp_verfier_windows_amd64"
skip_cleanup: true
on:
tags: true
39 changes: 29 additions & 10 deletions hashicorp_verifier/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,36 @@ package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = glob(["*.go"]),
importpath = "github.com/mitchelldavis/hashicorp_verifier",
deps = [
"@org_golang_x_crypto//openpgp:go_default_library",
"@org_golang_x_crypto//openpgp/armor:go_default_library",
"@org_golang_x_crypto//openpgp/packet:go_default_library",
],
name = "go_default_library",
srcs = glob(["*.go"]),
importpath = "github.com/mitchelldavis/hashicorp_verifier",
deps = [
"@org_golang_x_crypto//openpgp:go_default_library",
"@org_golang_x_crypto//openpgp/armor:go_default_library",
"@org_golang_x_crypto//openpgp/packet:go_default_library",
],
)

go_binary(
name = "hashicorp_verifier",
embed = [":go_default_library"],
name = "hashicorp_verifier_linux_amd64",
embed = [":go_default_library"],
goos = "linux",
goarch = "amd64",
pure = "on"
)

go_binary(
name = "hashicorp_verifier_darwin_amd64",
embed = [":go_default_library"],
goos = "darwin",
goarch = "amd64",
pure = "on"
)

go_binary(
name = "hashicorp_verifier_windows_amd64",
embed = [":go_default_library"],
goos = "windows",
goarch = "amd64",
pure = "on"
)

0 comments on commit 7e1ef52

Please sign in to comment.