Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
liamg committed Jan 9, 2020
1 parent 90192d4 commit f0c86f7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 39 deletions.
28 changes: 24 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,27 @@ env:
- secure: aHaMh/YPzghJeQKyki/Nkbn0194xW6L9yynHdyyESTOAPuF+IYBBQhFPXI1q8r/ovhhiiQPbqfYAuWez04NC05WygSB/RJTwf+n2e2sv3PV2aDkHWZvSyiwbPLoPLE7T5SVQWnzom19qKbzHr+B0dP126GkW5jhxIXVQvFm0xs3nnyOmZwnp5C2gWukPf8rhWnvel7BpauyUvweHhuQJr78C56HGyMttddM1vjNGKoXpumokfAjIcX0h5zikwTACBana64QoK0qEoaJtI4og9L90O6+zo+DIjaTmLQj3dy9vql0nuzBvzGIX9UEexUC0GqQZa1dQNXei/N7XtThCSa3RCQkRFLeGncB/MZQ9u2JAeMUnkdYXohnkNpihqohKlZ1j2IoeoNfwsGIMrOJCXcnH5ZIjuVFc5uXhT6kR25zrcxxkau+9csq37L6YZxM4JwoMvF+yIFmmEZancAnU6tSrw4B+IrsiWEWMWirq2WALrmKZIlyeJi/vPd2qIP+rwaTazC5Kdz6BHkC5Nmb84rbPJw+0GqORHBkO3O3eQmfXxnrVyxwHfq+a4qKTj3JSGAZaKT9a1Cru5clO4CZOIOy9m8439/s/NgGeHtIZjFTL4rDhBRhWzzyrAxVfpk2R48JcF39gwoKF92RSLKY2xyRchjyN5v5/OOOwO88ri18=
- secure: J7j5mhXkCrQBWXiekH/fqavq+64kPs4fKSVYR/UydJ+jYcdV/J4EeUQdZNA723JCYf6nSaeTOH4rQLvRsui+AVTk9kagLuA8G8Xw1MDG6YHaefqBPTySuqy3qErifYbStr0ohQvsShTeAj0NdGdMJKgGMVMDoAyL3CLLqaxaBWVuWnbuHHkOmUacNw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LVqTRwXucSz/1euKYAyGJkJElCGOCYwp8mQpDOPDqpTpUk6yZOni0W0CkgWau+fD/bRnkjjRyRDj2anQitMUM/J0=
script:
- make
after_success:
- make release
- secure: OihOsFf4xe0CenuanxpurE11A+JeAv5Rdz8bLU0BznUt85v4PJEzqWBxRdHTs76IydA3vNa96WMEUvWMCsyknsmB9pQ6aD1Iofun25B2luI7mbQA1RUgy1rTT0QCbrlo2HlURRBTuVvwc6p2rb0+Wg+ODfLaESuvwBaPoT8dfyo9PmZCAS5nOlWJHImH0LESH8zpIiwLzhvNVP4fPDZep/ZjBxJzp3lhRWy/ls8+b6OiDEoQkhOOEjLQJeojmHga4EB0T2iMB2LTzPgRMbFT/t64z62QRfIAsfH3CwlHpgwJqdhnepo/7Ptn6QR4ZnnCLxLXTMRLPsylWQuUT1+2WW5rfJiRNk1G/bUohHbpXXZ4E3o5B0tFLYpbuzJRoDhJy/K98BT1voDrV4RgRDEPizmF6NJiYOm12pCXKb7nfMCgS1I9LVKbH+22ZdIMJ3AWFT6nHxy52I5x6A2w93Tct59gINI4HI8uOnEeNQOaKQMgpovXRHj/iZqjnalHVcz4k7ntWDwNqw1MkI8JMwtpx/dNcAGLVN/qIpSjknAyPBCWD4M54E2PdyXR5FNB5A/56hUic4iraNuPvXo8DVRoJ3US8FIW+4nkOsH4gg6RQwamzuV84Cvt6IaNAKnW8gruWjoR2GPOlw6OXJrjqgl4cY/sCyzu3EgwaESGymvIDlU=
jobs:
include:
- stage: test
name: Run tests
script:
- make test
- stage: package
name: Package
script:
- make package
deploy:
provider: releases
skip_cleanup: true
name: "$TRAVIS_TAG"
file:
- terraform-provider-alienvault_${TRAVIS_TAG}_linux_amd64.zip
- terraform-provider-alienvault_${TRAVIS_TAG}_darwin_amd64.zip
- terraform-provider-alienvault_${TRAVIS_TAG}_windows_amd64.zip
api_key:
secure: QRSprDZq1BScT5H4ZjRTadp0A4oEu0HrXhzSBcn1VVEvHzrWk1+RjGNPxn3IcgPA5ZQ3CdQyum19QLagLNy0SoVFnp+HdpLaOk/Tj7NhzQyNXDju1bD2LGhS5M3Ldm8K62+NGVP1EPhLbSi3nP38n4ZdhDUBVqosaf4Z7rlwnra4E2JFwjpkFosvBTEEQjNIuUr6fJfou8F68W9+hXYr+pTxpgAsymVuJfpdvdoJlO7becSw502UnVJ9pTMrx/SH2/4AyBnHXdDA28r16hkwfaVKZ3UoyyivF9TdKLCUHO2xnWoG5cFXhNvZo04/4OoXYLWw2FkWe/WdSxCOInU2PK0WY6X7v5so9r/WV+LcOYdbn7R7j+UWT7USusHfIBrIBDuaoBFaNXrrYibw2MCgMzD7i3HZ0ET7VZNqoYV43uZiNjPX3lWwtX7feW8TtRHRPM8m4S+ceyBMOCPUuPbKI7UTskPPI4xrD2zBlSnJVzeCMApv3bSo7v96+IV+Kr6GQx2q1VWtaFyH+6nalnwo0kS6IwIPopxGIAstvxiTDKPcgGc7SmRmYdUe9yusICxXdE8uZZzlkf5Btl6SnF468OzbrET6VgJg8O53LcmppVsxdvaxlGOn8Iv6NFXO5KHgJH2DARYzJoDA6HKBlKJf5A7W2xPmqTdV48agxkyaSYQ=
on:
repo: form3tech-oss/terraform-provider-alienvault
tags: true
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
default : vet test build
default: test

.PHONY: build
build:
go build
.PHONY: package
package:
./scripts/package.sh

.PHONY: vet
vet:
go vet ./...

.PHONY: test
.PHONY: vet
test:
go test -v ./...

.PHONY: release
release:
@curl -sL http://git.io/goreleaser | bash
27 changes: 0 additions & 27 deletions goreleaser.yml

This file was deleted.

15 changes: 15 additions & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
BINARY="terraform-provider-alienvault_${TRAVIS_TAG}"
GO111MODULE=on

GOOS=darwin GOARCH=amd64 go build -o "${BINARY}"
zip "${BINARY}_darwin_amd64.zip" "${BINARY}"
rm -f "${BINARY}"

GOOS=linux GOARCH=amd64 go build -o "${BINARY}"
zip "${BINARY}_linux_amd64.zip" "${BINARY}"
rm -f "${BINARY}"

GOOS=windows GOARCH=amd64 go build -o "${BINARY}"
zip "${BINARY}_windows_amd64.zip" "${BINARY}"
rm -f "${BINARY}"

0 comments on commit f0c86f7

Please sign in to comment.