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

remove mage, update go and deps #135

Merged
merged 5 commits into from
Dec 11, 2024
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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: ci

on:
Expand All @@ -15,9 +16,9 @@ on:
env:
VAULT_ADDR: https://vault.eng.aserto.com/
PRE_RELEASE: ${{ github.ref == 'refs/heads/main' && 'main' || '' }}
GO_VERSION: "1.22"
GO_RELEASER_VERSION: "v1.24.0"
GO_LANGCI_LINT_VERSION: "v1.56.2"
GO_VERSION: "1.23"
GO_RELEASER_VERSION: "v2.3.2"
GO_LANGCI_LINT_VERSION: "v1.61.0"
GO_TESTSUM_VERSION: "1.11.0"

jobs:
Expand All @@ -31,6 +32,7 @@ jobs:
- "./cli"
- "./plugins/auth0"
- "./plugins/azuread"
- "./plugins/azureadb2c"
- "./plugins/cognito"
- "./plugins/fusionauth"
- "./plugins/google"
Expand All @@ -57,7 +59,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
-
name: Lint package ${{ matrix.package }}
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GO_LANGCI_LINT_VERSION }}
install-mode: binary
Expand Down
42 changes: 10 additions & 32 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ linters-settings:
funlen:
lines: 100
statements: 80
gci:
local-prefixes: github.com/golangci/golangci-lint
goconst:
min-len: 2
min-occurrences: 2
Expand All @@ -40,16 +38,13 @@ linters-settings:
golint:
min-confidence: 0
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
checks:
- argument
- case
- condition
- return
govet:
check-shadowing: true
shadow: true
settings:
printf:
funcs:
Expand All @@ -75,15 +70,15 @@ linters:
- bodyclose
- dogsled
- errcheck
- exportloopref
- copyloopvar
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- goerr113
- err113
- gofmt
- goimports
- goprintffuncname
Expand All @@ -94,7 +89,7 @@ linters:
- misspell
- nakedret
- noctx
# - rowserrcheck https://github.com/golangci/golangci-lint/issues/2649.
- rowserrcheck
- staticcheck
- stylecheck
- testpackage
Expand Down Expand Up @@ -138,23 +133,6 @@ issues:
- text: "unnamedResult:"
linters:
- gocritic
- path: \.resolvers\.go
text: "typeDefFirst:"
linters:
- gocritic
- path: \.resolvers\.go
text: "paramTypeCombine:"
linters:
- gocritic
- path: \.resolvers\.go
text: "hugeParam:"
linters:
- gocritic
- text: "G404"
linters:
- gosec

run:
timeout: 5m
skip-dirs:
- pkg/testharness/testdata
- gosec
63 changes: 33 additions & 30 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
version: 2
project_name: ds-load

env:
Expand Down Expand Up @@ -33,8 +35,8 @@ builds:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/ommon/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-auth0
Expand All @@ -55,9 +57,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-okta
Expand All @@ -78,9 +80,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-azuread
Expand All @@ -101,9 +103,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-azureadb2c
Expand All @@ -124,9 +126,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk//version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-cognito
Expand All @@ -147,9 +149,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-fusionauth
Expand All @@ -170,9 +172,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-google
Expand All @@ -193,9 +195,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk//version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-ldap
Expand All @@ -216,9 +218,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

- id: ds-load-openapi
Expand All @@ -239,9 +241,9 @@ builds:
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/common/version.date={{.Date}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/sdk/common/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"

archives:
Expand All @@ -259,7 +261,7 @@ checksum:

snapshot:
# https://goreleaser.com/customization/snapshots/
name_template: "{{ incpatch .Version }}-{{ .ShortCommit }}{{ if .IsGitDirty }}-dirty{{ end }}"
version_template: "{{ incpatch .Version }}-{{ .ShortCommit }}{{ if .IsGitDirty }}-dirty{{ end }}"

source:
# https://goreleaser.com/customization/source/
Expand Down Expand Up @@ -318,6 +320,7 @@ brews:
bin.install "ds-load"
bin.install "ds-load-auth0"
bin.install "ds-load-azuread"
bin.install "ds-load-azureadb2c"
bin.install "ds-load-cognito"
bin.install "ds-load-fusionauth"
bin.install "ds-load-google"
Expand Down
30 changes: 0 additions & 30 deletions Depfile

This file was deleted.

4 changes: 2 additions & 2 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ deps:
commit: a6c49f84cc0f4e038680d390392e2ab0
digest: b5:e968392e88ff7915adcbd1635d670b45bff8836ec2415d81fc559ca5470a695dbdc30030bad8bc5764647c731079e9e7bba0023ea25c4e4a1672a7d2561d4a19
- name: buf.build/googleapis/googleapis
commit: 8bc2c51e08c447cd8886cdea48a73e14
digest: b5:b7e0ac9d192bd0eae88160101269550281448c51f25121cd0d51957661a350aab07001bc145fe9029a8da10b99ff000ae5b284ecaca9c75f2a99604a04d9b4ab
commit: c0913f24652a4cfc95f77d97443a5005
digest: b5:4edb1480036c60f7867d75417d7faa87c851c96a4988a9746058a24e8e9bb4978daed0af35d57f6043de5a60355978dceaaa93dc992be99193260ac8823cbb8f
- name: buf.build/grpc-ecosystem/grpc-gateway
commit: a48fcebcf8f140dd9d09359b9bb185a4
digest: b5:330af8a71b579ab96c4f3ee26929d1a68a5a9e986c7cfe0a898591fc514216bb6e723dc04c74d90fdee3f3f14f9100a54b4f079eb273e6e7213f0d5baca36ff8
2 changes: 1 addition & 1 deletion cli/cmd/ds-load/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/alecthomas/kong"
"github.com/aserto-dev/ds-load/cli/pkg/app"
"github.com/aserto-dev/ds-load/cli/pkg/cc"
"github.com/aserto-dev/ds-load/cli/pkg/constants"
"github.com/aserto-dev/ds-load/cli/pkg/plugin"
"github.com/aserto-dev/ds-load/sdk/common"
"github.com/aserto-dev/ds-load/sdk/common/cc"
"github.com/aserto-dev/ds-load/sdk/common/kongyaml"
)

Expand Down
Loading
Loading