Skip to content

Commit

Permalink
feat: add goreleaser for releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-karan committed Aug 21, 2020
1 parent ec884f9 commit b1dcc36
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ terraform
# Custom stuff
.env
.tf-kite-secret
dist/
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
env:
- GO111MODULE=on
- CGO_ENABLED=0
- RELEASE_BUILDS=dist/terraform-provider-kite_darwin_amd64/terraform-provider-kite dist/terraform-provider-kite_linux_amd64/terraform-provider-kite

builds:
- binary: terraform-provider-kite
goos:
- darwin
- linux
goarch:
- amd64
ldflags:
- -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})"

archives:
- format: tar.gz
files:
- README.md
- LICENSE
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Well, honestly this is a fun project aimed at learning to build a Terraform Plug

## Installing

Download `bin/terraform-provider-kite` and place it on your machine at `~/.terraform.d/plugins/mrkaran.dev/github/kite/`. Follow the [official instructions](https://www.terraform.io/docs/configuration/providers.html#third-party-plugins) for more information.
Download `bin/terraform-provider-kite` and place it on your machine at `$PLUGIN_DIRECTORY/$SOURCEHOSTNAME/$SOURCENAMESPACE/$NAME/$VERSION/$OS_$ARCH/`. Follow the [instructions to install Third-party Providers](https://www.hashicorp.com/blog/automatic-installation-of-third-party-providers-with-terraform-0-13/) if you get stuck.

```sh
```
Expand Down Expand Up @@ -82,12 +82,12 @@ provider "kite" {

## Warnings and Caveats

- The author of this program is currently employed by Zerodha but this software isn't assosciated with Zerodha in any manner. This is a completely open and FOSS project.
1) The author of this program is currently employed by Zerodha but this software isn't assosciated with Zerodha in any manner. This is a completely open and FOSS project.

- If you use this program and lose money, don't blame me. This software comes with absolutely no
2) If you use this program and lose money, don't blame me. This software comes with absolutely no
guarantees.

- Due to Indian Exchange regulations and guidelines the user(s) are expected to login to the trading platform every day before placing trades. To comply with that, the login cannot be automated. Since Terraform needs to call Kite API to get the latest state and modify the state, any kind of API call needs an access token. It is not possible to persist the Access Token across Terraform runs so this program persists it on the user's local path `.tf-kite-secret`. Future versions of this program will make the path to this file as a provider config. You are expected to keep this file private and not keep this open to shared environments. To repeat point `2)`, if you lose money while using/due to this program, don't blame me.
3) Due to Indian Exchange regulations and guidelines the user(s) are expected to login to the trading platform every day before placing trades. To comply with that, the login cannot be automated. Since Terraform needs to call Kite API to get the latest state and modify the state, any kind of API call needs an access token. It is not possible to persist the Access Token across Terraform runs so this program persists it on the user's local path `.tf-kite-secret`. Future versions of this program will make the path to this file as a provider config. You are expected to keep this file private and not keep this open to shared environments. To repeat point `2)`, if you lose money while using/due to this program, don't blame me.

### Develop

Expand Down

0 comments on commit b1dcc36

Please sign in to comment.