v0.9.0
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful

This commit is contained in:
Andrew Woodlee 2025-02-23 22:10:42 -06:00
parent 2b4d191271
commit a163c11129
5 changed files with 51 additions and 3 deletions

View File

@ -167,3 +167,39 @@ Global Flags:
Use "backy list [command] --help" for more information about a command. Use "backy list [command] --help" for more information about a command.
``` ```
## list cmds
```
List commands defined in config file
Usage:
backy list cmds [cmd1 cmd2 cmd3...] [flags]
Flags:
-h, --help help for cmds
Global Flags:
--cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from
--log-file string log file to write to
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level
```
## list lists
```
List lists defined in config file
Usage:
backy list lists [list1 list2 ...] [flags]
Flags:
-h, --help help for lists
Global Flags:
--cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from
--log-file string log file to write to
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level
```

View File

@ -15,5 +15,5 @@ The `exec` subcommand can do some things that the configuration file can't do ye
The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file. The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file.
```sh ```sh
backy exec host [--commands command1 -commands command2 ... | -c command1 -c command2 ...] [--hosts host1 --hosts hosts2 ... | -m host1 -c host2 ...] [flags] backy exec host [--commands=command1 -commands=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -c host2 ...] [flags]
``` ```

View File

@ -14,4 +14,4 @@ If using S3, you should use the s3 protocol URI: `s3://bucketName/key/path`. You
## Scripts ## Scripts
Scripts will be coming later. Remote script support is currently limited to http/https endpoints.

View File

@ -63,5 +63,17 @@ echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} list -h >> _index.md" eval "${BACKYCOMMAND} list -h >> _index.md"
echo "\`\`\`" >> _index.md echo "\`\`\`" >> _index.md
echo "## list cmds" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} list cmds -h >> _index.md"
echo "\`\`\`" >> _index.md
echo "## list lists" >> _index.md
echo "" >> _index.md
echo "\`\`\`" >> _index.md
eval "${BACKYCOMMAND} list lists -h >> _index.md"
echo "\`\`\`" >> _index.md
mv _index.md "$CLI_PAGE" mv _index.md "$CLI_PAGE"

View File

@ -49,6 +49,7 @@ func NewS3Fetcher(endpoint string, options ...FetcherOption) (*S3Fetcher, error)
println(err.Error()) println(err.Error())
return nil, err return nil, err
} }
// Initialize S3 client if not provided // Initialize S3 client if not provided
if cfg.S3Client == nil { if cfg.S3Client == nil {
s3Client, err = minio.New(s3Endpoint, &minio.Options{ s3Client, err = minio.New(s3Endpoint, &minio.Options{
@ -128,7 +129,6 @@ func (s *S3Fetcher) Hash(data []byte) string {
} }
func getS3Credentials(profile, host string, httpClient *http.Client) (*credentials.Credentials, error) { func getS3Credentials(profile, host string, httpClient *http.Client) (*credentials.Credentials, error) {
// println(s3utils.GetRegionFromURL(*u))
homeDir, hdirErr := homedir.Dir() homeDir, hdirErr := homedir.Dir()
if hdirErr != nil { if hdirErr != nil {
return nil, hdirErr return nil, hdirErr