Skip to content

Commit 349a13f

Browse files
Merge pull request #1 from kosli-dev/update-dependencies
Update dependencies
2 parents d4706c8 + 1bf4337 commit 349a13f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+161
-74
lines changed

.github/workflows/go.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
os: [ubuntu-latest, macos-latest]
1616
runs-on: ${{ matrix.os }}
1717
steps:
18-
- uses: actions/setup-go@v3
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-go@v5
1920
with:
20-
go-version: '1.20'
21-
- uses: actions/checkout@v3
21+
go-version-file: 'go.mod'
2222
- name: Run tests
2323
run: go test -race ./...
2424
lint:
@@ -31,11 +31,11 @@ jobs:
3131
os: [macos-latest, ubuntu-latest]
3232
runs-on: ${{ matrix.os }}
3333
steps:
34-
- uses: actions/setup-go@v3
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-go@v5
3536
with:
36-
go-version: '1.20'
37-
- uses: actions/checkout@v3
37+
go-version-file: 'go.mod'
3838
- name: golangci-lint
39-
uses: golangci/golangci-lint-action@v3.4.0
39+
uses: golangci/golangci-lint-action@v6.5.1
4040
with:
41-
version: v1.52.0
41+
version: v1.64.8

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
release:
10+
name: Build and Release Binary
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set Up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: "1.23"
21+
22+
- name: Extract Version from Tag
23+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
24+
25+
- name: Build Binary
26+
run: |
27+
go build -ldflags "-X main.Version=kosli-dev-${VERSION}" -o aws-vault .
28+
29+
- name: Create GitHub Release
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
files: aws-vault
33+
tag_name: ${{ github.ref_name }}
34+
name: Release ${{ github.ref_name }}
35+
body: "Automated release of version ${{ github.ref_name }}"
36+
draft: false
37+
prerelease: false

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
permissions:
1010
issues: write
1111
steps:
12-
- uses: actions/stale@v7
12+
- uses: actions/stale@v9
1313
with:
1414
days-before-stale: 180
1515
days-before-close: 7

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ linters:
88
- errchkjson
99
- errname
1010
- exhaustive
11-
- exportloopref
11+
- copyloopvar
1212
- gofmt
1313
- goimports
1414
- makezero

cli/add.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"fmt"
56
"log"
@@ -34,7 +35,7 @@ func ConfigureAddCommand(app *kingpin.Application, a *AwsVault) {
3435
Default("true").
3536
BoolVar(&input.AddConfig)
3637

37-
cmd.Action(func(c *kingpin.ParseContext) error {
38+
cmd.Action(func(_ *kingpin.ParseContext) error {
3839
keyring, err := a.Keyring()
3940
if err != nil {
4041
return err

cli/add_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"log"
56
"os"

cli/clear.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"fmt"
56

@@ -21,7 +22,7 @@ func ConfigureClearCommand(app *kingpin.Application, a *AwsVault) {
2122
HintAction(a.MustGetProfileNames).
2223
StringVar(&input.ProfileName)
2324

24-
cmd.Action(func(c *kingpin.ParseContext) (err error) {
25+
cmd.Action(func(_ *kingpin.ParseContext) (err error) {
2526
keyring, err := a.Keyring()
2627
if err != nil {
2728
return err

cli/exec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"context"
56
"fmt"
@@ -118,7 +119,7 @@ func ConfigureExecCommand(app *kingpin.Application, a *AwsVault) {
118119
cmd.Arg("args", "Command arguments").
119120
StringsVar(&input.Args)
120121

121-
cmd.Action(func(c *kingpin.ParseContext) (err error) {
122+
cmd.Action(func(_ *kingpin.ParseContext) (err error) {
122123
input.Config.MfaPromptMethod = a.PromptDriver(hasBackgroundServer(input))
123124
input.Config.NonChainedGetSessionTokenDuration = input.SessionDuration
124125
input.Config.AssumeRoleDuration = input.SessionDuration

cli/exec_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"github.com/alecthomas/kingpin/v2"
56

cli/export.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cli
22

3+
// nolint:depguard
34
import (
45
"context"
56
"encoding/json"
@@ -64,7 +65,7 @@ func ConfigureExportCommand(app *kingpin.Application, a *AwsVault) {
6465
HintAction(a.MustGetProfileNames).
6566
StringVar(&input.ProfileName)
6667

67-
cmd.Action(func(c *kingpin.ParseContext) (err error) {
68+
cmd.Action(func(_ *kingpin.ParseContext) (err error) {
6869
input.Config.MfaPromptMethod = a.PromptDriver(false)
6970
input.Config.NonChainedGetSessionTokenDuration = input.SessionDuration
7071
input.Config.AssumeRoleDuration = input.SessionDuration
@@ -103,13 +104,17 @@ func ExportCommand(input ExportCommandInput, f *vault.ConfigFile, keyring keyrin
103104

104105
if input.Format == FormatTypeExportJSON {
105106
return printJSON(input, credsProvider)
106-
} else if input.Format == FormatTypeExportINI {
107+
}
108+
109+
if input.Format == FormatTypeExportINI {
107110
return printINI(credsProvider, input.ProfileName, config.Region)
108-
} else if input.Format == FormatTypeExportEnv {
111+
}
112+
113+
if input.Format == FormatTypeExportEnv {
109114
return printEnv(input, credsProvider, config.Region, "export ")
110-
} else {
111-
return printEnv(input, credsProvider, config.Region, "")
112115
}
116+
117+
return printEnv(input, credsProvider, config.Region, "")
113118
}
114119

115120
func printJSON(input ExportCommandInput, credsProvider aws.CredentialsProvider) error {

0 commit comments

Comments
 (0)