Skip to content

Commit

Permalink
Build method split to two forms, manual and automatic using build.sh …
Browse files Browse the repository at this point in the history
…script
  • Loading branch information
Damian Lubawy committed Dec 14, 2017
1 parent bd86a86 commit ba1fff4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
bin/*
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Otherwise, first read this guide on how to [get started with Vault](https://www.
To learn specifically about how plugins work, see documentation on [Vault plugins](https://www.vaultproject.io/docs/internals/plugins.html).

### Build
- manually
```shell
go get github.com/parnurzeal/gorequest
go get github.com/hashicorp/vault/plugins
Expand All @@ -24,6 +25,12 @@ go get github.com/google/gofuzz
go build -o vault_keystone_plugin .
```

- using build.sh
```shell
$ ./build.sh
```
Plugin binary will be builded in `bin` directory

### Installation

##### Build the plugin.
Expand Down
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

PLUGIN_BIN='bin/vault_keystone_plugin'

mkdir -p bin
echo " -> Building plugin"
go get github.com/parnurzeal/gorequest
go get github.com/hashicorp/vault/plugins
go get github.com/hashicorp/go-plugin
go get github.com/fatih/structs
go get github.com/google/gofuzz
if [ -f "${PLUGIN_BIN}" ]; then
rm ${PLUGIN_BIN}
go build -o ${PLUGIN_BIN} .
else
go build -o ${PLUGIN_BIN} .
fi
ls -al ${PLUGIN_BIN}

0 comments on commit ba1fff4

Please sign in to comment.