-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Binaries Command Improved
- Loading branch information
Showing
11 changed files
with
175 additions
and
8 deletions.
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
github.com | ||
|
||
# Complied binaries | ||
cmd/param/param-* | ||
bin/ | ||
|
||
### macOS ### | ||
# General | ||
|
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,29 @@ | ||
|
||
PLATFORMS="darwin/amd64 linux/amd64" | ||
|
||
type setopt >/dev/null 2>&1 | ||
|
||
SCRIPT_NAME=`basename "$0"` | ||
FAILURES="" | ||
|
||
if [ -z "${GOPATH}" ]; then | ||
GOPATH="~/go" | ||
fi | ||
BIN_PATH="${GOPATH}/src/github.com/willjcj/param/bin" | ||
|
||
for PLATFORM in $PLATFORMS; do | ||
GOOS=${PLATFORM%/*} | ||
GOARCH=${PLATFORM#*/} | ||
BIN_FILENAME="${BIN_PATH}/param-${GOOS}-${GOARCH}" | ||
|
||
CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${BIN_FILENAME} $@" | ||
echo "${CMD}" | ||
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}" | ||
done | ||
|
||
# eval errors | ||
if [[ "${FAILURES}" != "" ]]; then | ||
echo "" | ||
echo "${SCRIPT_NAME} failed on: ${FAILURES}" | ||
exit 1 | ||
fi |
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,25 @@ | ||
package main | ||
|
||
import ( | ||
"go/build" | ||
"log" | ||
"os" | ||
"path" | ||
|
||
"github.com/spf13/cobra/doc" | ||
"github.com/willjcj/param/cmd" | ||
) | ||
|
||
func main() { | ||
gopath := os.Getenv("GOPATH") | ||
if gopath == "" { | ||
gopath = build.Default.GOPATH | ||
} | ||
|
||
docsPath := path.Join(gopath, "src", "github.com", "willjcj", "param", "docs") | ||
|
||
err := doc.GenMarkdownTree(cmd.RootCmd, docsPath) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -17,5 +17,5 @@ var addCmd = &cobra.Command{ | |
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(addCmd) | ||
RootCmd.AddCommand(addCmd) | ||
} |
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
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,22 @@ | ||
## param | ||
|
||
Tools to improve Parameter Store on the command line. | ||
|
||
### Synopsis | ||
|
||
Param is a cli tool to improve interacting with AWS Parameter Store. | ||
|
||
### Options | ||
|
||
``` | ||
--config string config file (default is $HOME/.param.yaml) | ||
-h, --help help for param | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [param add](param_add.md) - Add a paramter to Parameter Store. | ||
* [param copy](param_copy.md) - Copy a parameter to clipboard. | ||
* [param list](param_list.md) - List parameters in Parameter Store. | ||
|
||
###### Auto generated by spf13/cobra on 1-Jul-2018 |
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,30 @@ | ||
## param add | ||
|
||
Add a paramter to Parameter Store. | ||
|
||
### Synopsis | ||
|
||
Add a paramter to Parameter Store. | ||
Doesn't work yet. | ||
|
||
``` | ||
param add [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for add | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string config file (default is $HOME/.param.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [param](param.md) - Tools to improve Parameter Store on the command line. | ||
|
||
###### Auto generated by spf13/cobra on 1-Jul-2018 |
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,30 @@ | ||
## param copy | ||
|
||
Copy a parameter to clipboard. | ||
|
||
### Synopsis | ||
|
||
Copy the specified SSM Parameter from Paramter Store to your clipboard. | ||
|
||
``` | ||
param copy parameter_name [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for copy | ||
-v, --verbose Also print parameter value to the stdout. | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string config file (default is $HOME/.param.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [param](param.md) - Tools to improve Parameter Store on the command line. | ||
|
||
###### Auto generated by spf13/cobra on 1-Jul-2018 |
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,31 @@ | ||
## param list | ||
|
||
List parameters in Parameter Store. | ||
|
||
### Synopsis | ||
|
||
List all parameters from parameter store with an optional prefix. | ||
Results are sorted in alphabetical order. | ||
|
||
``` | ||
param list [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for list | ||
-p, --prefix string Prefixes to fileter by | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string config file (default is $HOME/.param.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [param](param.md) - Tools to improve Parameter Store on the command line. | ||
|
||
###### Auto generated by spf13/cobra on 1-Jul-2018 |