Skip to content

Commit

Permalink
Merge pull request #900 from synfinatic/fix-homebrew
Browse files Browse the repository at this point in the history
fix homebrew and credentials --profile
  • Loading branch information
synfinatic authored Jun 13, 2024
2 parents 4a355f8 + 0b73a4f commit a74a0da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

## [v1.16.1] - 2024-06-13

### Bugs

* Fix homebrew build on macOS
* `credentials --profiles` is now `credentials --profile` to conform to standard

## [v1.16.0] - 2024-06-12

### New Features
Expand Down Expand Up @@ -679,8 +686,9 @@

Initial release

[Unreleased]: https://github.com/synfinatic/aws-sso-cli/compare/v1.16.0...main
[v1.16.0]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.15.1
[Unreleased]: https://github.com/synfinatic/aws-sso-cli/compare/v1.16.1...main
[v1.16.1]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.16.1
[v1.16.0]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.16.0
[v1.15.1]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.15.1
[v1.15.0]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.15.0
[v1.14.3]: https://github.com/synfinatic/aws-sso-cli/releases/tag/v1.14.3
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT_VERSION := 1.16.0
PROJECT_VERSION := 1.16.1
DOCKER_REPO := synfinatic
PROJECT_NAME := aws-sso

Expand Down Expand Up @@ -35,10 +35,11 @@ BUILDINFOS ?= $(shell date +%FT%T%z)$(BUILDINFOSDET)
LDFLAGS := -X "main.Version=$(PROJECT_VERSION)" -X "main.Delta=$(PROJECT_DELTA)" -X "main.Buildinfos=$(BUILDINFOS)" -X "main.Tag=$(PROJECT_TAG)" -X "main.CommitID=$(PROJECT_COMMIT)"
OUTPUT_NAME := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION) # default for current platform

ifeq ($(GOOS),darwin)
#ifeq ($(GOOS),darwin)
# https://github.com/golang/go/issues/61229#issuecomment-1988965927
LDFLAGS := $(LDFLAGS) -extldflags=-Wl,-ld_classic
endif
# this doesn't work for homebrew with clang it seems: https://github.com/Homebrew/homebrew-core/pull/174439
#LDFLAGS := $(LDFLAGS) -extldflags=-Wl,-ld_classic
#endif

# go build flags
GOBFLAGS := -trimpath
Expand Down
8 changes: 4 additions & 4 deletions cmd/aws-sso/credentials_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
)

type CredentialsCmd struct {
File string `kong:"short='f',help='File to write credentials to (default: stdout)',predictor='allFiles'"`
Append bool `kong:"short='a',help='Append to the file instead of overwriting'"`
Profiles []string `kong:"required,short='p',name='profiles',help='Profiles to write credentials for',predictor='profile'"`
File string `kong:"short='f',help='File to write credentials to (default: stdout)',predictor='allFiles'"`
Append bool `kong:"short='a',help='Append to the file instead of overwriting'"`
Profile []string `kong:"required,short='p',name='profile',help='List of profiles to write credentials for',predictor='profile'"`
}

func (cc *CredentialsCmd) Run(ctx *RunContext) error {
Expand All @@ -18,7 +18,7 @@ func (cc *CredentialsCmd) Run(ctx *RunContext) error {

creds := []awsconfig.ProfileCredentials{}

for _, profile := range ctx.Cli.Credentials.Profiles {
for _, profile := range ctx.Cli.Credentials.Profile {
roleFlat, err := cache.Roles.GetRoleByProfile(profile, ctx.Settings)
if err != nil {
return err
Expand Down

0 comments on commit a74a0da

Please sign in to comment.