Compare commits
4 Commits
bb693dbb97
...
v0.9.1
Author | SHA1 | Date | |
---|---|---|---|
80a45cd595 | |||
551c8ad441 | |||
3823b1bf44 | |||
f777c78aad |
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: '`list` command with subcommands `cmds` and `lists`'
|
||||
time: 2025-02-20T14:45:49.562361581-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: Deprecation and unsupported warnings for old config keys
|
||||
time: 2025-02-20T14:50:14.048452348-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
time: 2025-02-20T14:52:45.030582408-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: Command type `remoteScript`. See docs for more info.
|
||||
time: 2025-02-21T00:30:12.276616792-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Changed
|
||||
body: change to enums for Command type
|
||||
time: 2025-02-23T15:30:12.033359922-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Changed
|
||||
body: Cache now stores resources by URL hash for ease-of-lookup
|
||||
time: 2025-02-23T15:33:05.33444642-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Changed
|
||||
body: Changed PackageOperation to enums
|
||||
time: 2025-02-28T17:38:25.426136588-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Fixed
|
||||
body: Local command's `dir` full path is now found with home directory
|
||||
time: 2025-02-20T14:48:43.475300515-06:00
|
12
.changes/v0.9.0.md
Normal file
12
.changes/v0.9.0.md
Normal file
@ -0,0 +1,12 @@
|
||||
## v0.9.0 - 2025-02-28
|
||||
### Added
|
||||
* `list` command with subcommands `cmds` and `lists`
|
||||
* Deprecation and unsupported warnings for old config keys
|
||||
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
* Command type `remoteScript`. See docs for more info.
|
||||
### Changed
|
||||
* change to enums for Command type
|
||||
* Cache now stores resources by URL hash for ease-of-lookup
|
||||
* Changed PackageOperation to enums
|
||||
### Fixed
|
||||
* Local command's `dir` full path is now found with home directory
|
3
.changes/v0.9.1.md
Normal file
3
.changes/v0.9.1.md
Normal file
@ -0,0 +1,3 @@
|
||||
## v0.9.1 - 2025-03-01
|
||||
### Changed
|
||||
* Use EnvVar AWS_PROFILE to get S3 profile
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -6,6 +6,23 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v0.9.1 - 2025-03-01
|
||||
### Changed
|
||||
* Use EnvVar AWS_PROFILE to get S3 profile
|
||||
|
||||
## v0.9.0 - 2025-02-28
|
||||
### Added
|
||||
* `list` command with subcommands `cmds` and `lists`
|
||||
* Deprecation and unsupported warnings for old config keys
|
||||
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
* Command type `remoteScript`. See docs for more info.
|
||||
### Changed
|
||||
* change to enums for Command type
|
||||
* Cache now stores resources by URL hash for ease-of-lookup
|
||||
* Changed PackageOperation to enums
|
||||
### Fixed
|
||||
* Local command's `dir` full path is now found with home directory
|
||||
|
||||
## v0.8.0 - 2025-02-15
|
||||
### Changed
|
||||
* Breaking: `cmd-lists` key changed to `cmdLists`
|
||||
|
@ -8,8 +8,10 @@
|
||||
"settings": {
|
||||
"cSpell.words": [
|
||||
"Autorestic",
|
||||
"changie",
|
||||
"Cmds",
|
||||
"CMDSTDOUT",
|
||||
"goreleaser",
|
||||
"knadh",
|
||||
"koanf",
|
||||
"mattn",
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const versionStr = "0.9.0"
|
||||
const versionStr = "0.9.1"
|
||||
|
||||
var (
|
||||
versionCmd = &cobra.Command{
|
||||
|
@ -12,6 +12,10 @@ For the main config file to be fetched remotely, pass the URL using `-f [url]`.
|
||||
|
||||
If using S3, you should use the s3 protocol URI: `s3://bucketName/key/path`. You will also need to set the env variable `S3_ENDPOINT` to the appropriate value. The flag `--s3-endpoint` can be used to override this value or to set this value, if not already set.
|
||||
|
||||
## Authentication
|
||||
|
||||
Currently, only the AWS authentication credentials file `~/.aws/credentials` is supported. For now, the environment variable `AWS_PROFILE` is used to lookup the profile.
|
||||
|
||||
## Scripts
|
||||
|
||||
Remote script support is currently limited to http/https endpoints.
|
@ -44,9 +44,8 @@ func NewS3Fetcher(endpoint string, options ...FetcherOption) (*S3Fetcher, error)
|
||||
*/
|
||||
|
||||
s3Endpoint := os.Getenv("S3_ENDPOINT")
|
||||
creds, err := getS3Credentials("default", s3Endpoint, cfg.HTTPClient)
|
||||
creds, err := getS3Credentials(os.Getenv("AWS_PROFILE"), s3Endpoint, cfg.HTTPClient)
|
||||
if err != nil {
|
||||
println(err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -133,7 +132,7 @@ func getS3Credentials(profile, host string, httpClient *http.Client) (*credentia
|
||||
if hdirErr != nil {
|
||||
return nil, hdirErr
|
||||
}
|
||||
s3Creds := credentials.NewFileAWSCredentials(path.Join(homeDir, ".aws", "credentials"), "default")
|
||||
s3Creds := credentials.NewFileAWSCredentials(path.Join(homeDir, ".aws", "credentials"), profile)
|
||||
credVals, credErr := s3Creds.GetWithContext(&credentials.CredContext{Endpoint: host, Client: httpClient})
|
||||
if credErr != nil {
|
||||
return nil, credErr
|
||||
|
Reference in New Issue
Block a user