mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-10 04:21:26 +00:00
Fixed sail trans dl flag. Added versioning to the CLI.
This commit is contained in:
4
Makefile
4
Makefile
@@ -1,4 +1,4 @@
|
|||||||
VERSION ?= dev
|
VERSION = 0.0.2
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean ./...
|
go clean ./...
|
||||||
@@ -12,6 +12,6 @@ test:
|
|||||||
docker run --rm cli go test -v -count=1 ./...
|
docker run --rm cli go test -v -count=1 ./...
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go build -o /usr/local/bin/sail
|
go build -o /usr/local/bin/sail -ldflags="-X 'github.com/sailpoint-oss/sailpoint-cli/cmd/root.version=$(VERSION)'"
|
||||||
|
|
||||||
.PHONY: clean mocks test install .docker/login .docker/build .docker/push
|
.PHONY: clean mocks test install .docker/login .docker/build .docker/push
|
||||||
|
|||||||
@@ -10,10 +10,13 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var version = "0.0.1"
|
||||||
|
|
||||||
func NewRootCmd(client client.Client) *cobra.Command {
|
func NewRootCmd(client client.Client) *cobra.Command {
|
||||||
root := &cobra.Command{
|
root := &cobra.Command{
|
||||||
Use: "sail",
|
Use: "sail",
|
||||||
Short: "sail",
|
Short: "sail",
|
||||||
|
Version: version,
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
CompletionOptions: cobra.CompletionOptions{
|
CompletionOptions: cobra.CompletionOptions{
|
||||||
DisableDefaultCmd: true,
|
DisableDefaultCmd: true,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ func newDownloadCmd(client client.Client) *cobra.Command {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
destination := cmd.Flags().Lookup("output").Value.String()
|
destination := cmd.Flags().Lookup("destination").Value.String()
|
||||||
|
|
||||||
for _, v := range transforms {
|
for _, v := range transforms {
|
||||||
filename := v["name"].(string) + ".json"
|
filename := v["name"].(string) + ".json"
|
||||||
|
|||||||
Reference in New Issue
Block a user