@@ -1,8 +1,8 @@
|
||||
diff --git a/README.md b/README.md
|
||||
index db2292b..400fbc2 100644
|
||||
index 4740e58..5fd44fe 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -24,7 +24,7 @@ Available Commands:
|
||||
@@ -25,7 +25,7 @@ Available Commands:
|
||||
license Download a license for the given order number at the given cadence name and version
|
||||
|
||||
Flags:
|
||||
@@ -10,17 +10,21 @@ index db2292b..400fbc2 100644
|
||||
+ -c, --config string config file (default is $XDG_CONFIG_HOME/viya4-orders-cli/config.yaml)
|
||||
-n, --file-name string name of the file where you want the downloaded order asset to be stored
|
||||
(defaults:
|
||||
certs - SASViyaV4_<order number>_certs.zip
|
||||
@@ -144,7 +144,7 @@ Take the following steps to start using SAS Viya Orders CLI:
|
||||
assetHistory - assetHistory_<order number>.json
|
||||
@@ -146,9 +146,9 @@ Take the following steps to start using SAS Viya Orders CLI:
|
||||
|
||||
1. If you want to use a configuration file, create it.
|
||||
|
||||
- The default location for the configuration file is `$HOME/.viya4-orders-cli`.
|
||||
+ The default location for the configuration file is `$XDG_CONFIG_HOME/viya4-orders-cli/config.yaml`.
|
||||
You can save the file anywhere you want as long as you use the `--config` /
|
||||
`-c` option to inform the CLI of any non-default location.
|
||||
- The default location for the configuration file is `$HOME/.viya4-orders-cli` and the default format is [YAML](https://yaml.org/).
|
||||
- You can save the file anywhere you want and use any supported format, as long as you use the `--config` /
|
||||
- `-c` option to specify its path and name to the CLI.
|
||||
+ The default location for the configuration file is `$XDG_CONFIG_HOME/viya4-orders-cli/config.yaml` and the default format is [YAML](https://yaml.org/).
|
||||
+ You can save the file anywhere you want as long as you use the `--config` /
|
||||
+ `-c` option to inform the CLI of any non-default location.
|
||||
|
||||
@@ -195,7 +195,7 @@ You have the following options for launching SAS Viya Orders CLI:
|
||||
When using the `-c` option to specify a config file, that file must have a valid extension denoting its format. Supported
|
||||
formats are [JSON](https://www.json.org/),
|
||||
@@ -196,7 +196,7 @@ You have the following options for launching SAS Viya Orders CLI:
|
||||
The examples in this section correspond to typical tasks that you might perform
|
||||
using SAS Viya Orders CLI:
|
||||
|
||||
@@ -29,7 +33,7 @@ index db2292b..400fbc2 100644
|
||||
convey your API credentials, get deployment assets for SAS Viya order `923456`
|
||||
at the latest version of the Long Term Support (`lts`) cadence. Send the
|
||||
contents to file `/c/Users/auser/vocli/sasfiles/923456_lts_depassets.tgz`:
|
||||
@@ -203,13 +203,13 @@ using SAS Viya Orders CLI:
|
||||
@@ -204,13 +204,13 @@ using SAS Viya Orders CLI:
|
||||
|
||||
```docker
|
||||
docker run -v /c/Users/auser/vocli:/sasstuff viya4-orders-cli deploymentAssets 923456 lts \
|
||||
@@ -46,7 +50,7 @@ index db2292b..400fbc2 100644
|
||||
AssetName: deploymentAssets
|
||||
AssetReqURL: https://api.sas.com/mysas/orders/923456/cadenceNames/lts/deploymentAssets
|
||||
diff --git a/cmd/root.go b/cmd/root.go
|
||||
index ad221c9..9707ed7 100644
|
||||
index f8870da..9b0816a 100644
|
||||
--- a/cmd/root.go
|
||||
+++ b/cmd/root.go
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
@@ -64,8 +68,8 @@ index ad221c9..9707ed7 100644
|
||||
- "config file (default is $HOME/.viya4-orders-cli)")
|
||||
+ "config file (default is $XDG_CONFIG_HOME/viya4-orders-cli/config.yaml)")
|
||||
rootCmd.PersistentFlags().StringVarP(&assetFileName, "file-name", "n", "",
|
||||
"name of the file where you want the downloaded order asset stored\n"+
|
||||
"(defaults:\n\tcerts - SASViyaV4_<order number>_certs.zip\n\tlicense and depassets - SASViyaV4_<order number>_<renewal sequence>_<cadence information>_<asset name>_<date time stamp>."+
|
||||
"name of the file where you want the downloaded order asset to be stored\n"+
|
||||
"(defaults:\n\tassetHistory - assetHistory_<order number>.json\n\tcerts - SASViyaV4_<order number>_certs.zip\n\tlicense and depassets - SASViyaV4_<order number>_<renewal sequence>_<cadence information>_<asset name>_<date time stamp>."+
|
||||
@@ -74,16 +73,9 @@ func initConfig() {
|
||||
// Use config file from the flag.
|
||||
viper.SetConfigFile(cfgFile)
|
||||
@@ -87,30 +91,30 @@ index ad221c9..9707ed7 100644
|
||||
}
|
||||
|
||||
diff --git a/go.mod b/go.mod
|
||||
index fbb9bb4..5008b3b 100644
|
||||
index 9fc71bd..0354b7c 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -3,7 +3,6 @@ module github.com/sassoftware/viya4-orders-cli
|
||||
go 1.19
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
- github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/viper v1.15.0
|
||||
golang.org/x/oauth2 v0.5.0
|
||||
github.com/spf13/cobra v1.8.1
|
||||
github.com/spf13/viper v1.19.0
|
||||
golang.org/x/oauth2 v0.26.0
|
||||
diff --git a/go.sum b/go.sum
|
||||
index 2f4164a..507c254 100644
|
||||
index b687b77..0e1433c 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -140,8 +140,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
@@ -23,8 +23,6 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
|
||||
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
-github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
diff --git a/lib/authn/authn.go b/lib/authn/authn.go
|
||||
index a35c405..6345b6f 100644
|
||||
--- a/lib/authn/authn.go
|
||||
|
Reference in New Issue
Block a user