Skip to content

Commit

Permalink
Merge pull request #4 from duplocloud/release/0.3.2
Browse files Browse the repository at this point in the history
Release v0.3.2
  • Loading branch information
joek-duplo authored Mar 18, 2022
2 parents 52a1c6b + 18f13b4 commit dbd323a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/finish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: finish-release
uses: duplocloud/ghactions-finish-gitflow-release@master
with:
github_token: ${{ secrets.DUPLO_GITHUB_TOKEN }}
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}

version-bump:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -61,5 +61,5 @@ jobs:
- name: Push develop
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DUPLO_GITHUB_TOKEN }}
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
branch: develop
2 changes: 1 addition & 1 deletion .github/workflows/start-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Start gitflow release
uses: duplocloud/ghactions-start-gitflow-release@master
with:
github_token: ${{ secrets.DUPLO_GITHUB_TOKEN }}
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
version: "${{ steps.version.outputs.release }}"
precommit_run: |
# Fail on errors
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.3.1
VERSION=0.3.2

default: all

Expand All @@ -13,5 +13,5 @@ test: all

all: duplo-aws-credential-process

duplo-aws-credential-process: duplocloud/*.go cmd/duplo-aws-credential-process/*.go
go build ./cmd/duplo-aws-credential-process/
duplo-aws-credential-process: Makefile duplocloud/*.go cmd/duplo-aws-credential-process/*.go
go build -ldflags "-X main.version=v$(VERSION)-dev -X main.commit=$(shell git rev-parse HEAD)" ./cmd/duplo-aws-credential-process/
16 changes: 16 additions & 0 deletions cmd/duplo-aws-credential-process/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func outputCreds(creds *AwsConfigOutput, cacheKey string) {
os.Stdout.WriteString("\n")
}

var commit string
var version string

func main() {
// Make sure we log to stderr - so we don't disturb the output to be collected by the AWS CLI
log.SetOutput(os.Stderr)
Expand All @@ -73,8 +76,21 @@ func main() {
tenantID := flag.String("tenant", "", "Get credentials for the given tenant")
debug := flag.Bool("debug", false, "Turn on verbose (debugging) output")
noCache = flag.Bool("no-cache", false, "Disable caching (not recommended)")
showVersion := flag.Bool("version", false, "Output version information and exit")
flag.Parse()

// Output version information
if *showVersion {
if version == "" {
version = "(dev build)"
}
if commit == "" {
commit = "(x)"
}
fmt.Printf("%s version %s (git commit %s)\n", os.Args[0], version, commit)
os.Exit(0)
}

// Refuse to call APIs over anything but https://
// Trim a trailing slash.
if host == nil || !strings.HasPrefix(*host, "https://") {
Expand Down

0 comments on commit dbd323a

Please sign in to comment.