Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Print Statement #1

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# Dependency directories (remove the comment below to include it)
# vendor/

bin/*

aws.toml
credentials.json
token.json
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ builds:
- goos: windows
goarch: 386
ldflags:
- -s -w -X github.com/awslabs/ssosync/cmd.version={{.Version}} -X github.com/awslabs/ssosync/cmd.commit={{.Commit}} -X github.com/awslabs/ssosync/cmd.date={{.Date}} -X github.com/awslabs/ssosync/cmd.builtBy=goreleaser
- -s -w -X github.com/awslabs/ssosync/cmd.version={{.Version}} -X github.com/awslabs/ssosync/cmd.commit={{.Commit}} -X github.com/awslabs/ssosync/cmd.date={{.Date}} -X github.com/awslabs/ssosync/cmd.builtBy=goreleaser -X github.com/awslabs/ssosync/cmd.gitRepo={{.GitURL}}
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
changelog:
Expand Down
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ var (
commit = "none"
date = "unknown"
builtBy = "unknown"

gitRepo = "unknown"
)

var cfg *config.Config
Expand Down Expand Up @@ -66,6 +68,7 @@ Complete documentation is available at https://github.com/awslabs/ssosync`,
// running inside of AWS Lambda, we use the Lambda
// execution path.
func Execute() {
log.Info(fmt.Sprintf("Starting Version: %s, of Repo: %s", version, gitRepo))
if cfg.IsLambda {
log.Info("Executing as Lambda")
lambda.Start(Handler)
Expand Down