Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <csatib02@gmail.com>

chore: update deps

Signed-off-by: Bence Csati <csatib02@gmail.com>
  • Loading branch information
csatib02 committed Sep 16, 2024
1 parent a2ff4e9 commit 48f8cfa
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
run: nix develop --impure .#ci

- name: Lint
run: nix develop --impure .#ci -c make lint
run: nix develop --impure .#ci -c make lint -j

license-check:
name: License check
Expand Down
10 changes: 10 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@ linters-settings:

linters:
enable:
- bodyclose
- errcheck
- gci
- gofmt
- gofumpt
- goimports
- gosimple
- ineffassign
- misspell
- nolintlint
- revive
- unconvert
- unparam
- unused
- whitespace
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0@sha256:0c6a569797744e45955f39d4f7538ac344bfb7ebf0a54006a0a4297b153ccf0f AS xx

FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.18@sha256:d1a601b64de09e2fa38c95e55838961811d5ca11062a8f4230a5c434b3ae2a34 AS builder
FROM --platform=$BUILDPLATFORM golang:1.23.1-alpine3.20@sha256:ac67716dd016429be8d4c2c53a248d7bcdf06d34127d3dc451bda6aa5a87bc06 AS builder

COPY --from=xx / /

Expand Down
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ help: ## Display this help
up: ## Start development environment
docker compose -f dev/vault/docker-compose.yml up -d

.PHONY: stop
stop: ## Stop development environment
docker compose -v -f dev/vault/docker-compose.yml stop

.PHONY: down
down: ## Destroy development environment
docker compose -v -f dev/vault/docker-compose.yml down
Expand All @@ -33,6 +29,9 @@ build: ## Build binary
@mkdir -p build
go build -race -o build/

.PHONY: artifacts
artifacts: container-image binary-snapshot ## Build artifacts

.PHONY: container-image
container-image: ## Build container image
docker build .
Expand All @@ -41,14 +40,11 @@ container-image: ## Build container image
binary-snapshot: ## Build binary snapshot
VERSION=v${GORELEASER_VERSION} ${GORELEASER_BIN} release --clean --skip=publish --snapshot

.PHONY: artifacts
artifacts: container-image binary-snapshot
artifacts: ## Build artifacts

##@ Checks

.PHONY: check
check: lint test ## Run lint checks and tests
check: test lint ## Run tests and lint checks

.PHONY: test
test: ## Run tests
Expand All @@ -60,15 +56,15 @@ lint: ## Run linters

.PHONY: lint-go
lint-go:
$(GOLANGCI_LINT_BIN) run $(if ${CI},--out-format github-actions,)
$(GOLANGCI_LINT_BIN) run $(if ${CI},--out-format colored-line-number,)

.PHONY: lint-docker
lint-docker:
hadolint Dockerfile
$(HADOLINT_BIN) Dockerfile

.PHONY: lint-yaml
lint-yaml:
yamllint $(if ${CI},-f github,) --no-warnings .
$(YAMLLINT_BIN) $(if ${CI},-f github,) --no-warnings .

.PHONY: fmt
fmt: ## Format code
Expand All @@ -85,16 +81,20 @@ deps: bin/golangci-lint bin/licensei bin/cosign bin/goreleaser
deps: ## Install dependencies

# Dependency versions
GOLANGCI_VERSION = 1.59.1
GOLANGCI_LINT_VERSION = 1.61.0
LICENSEI_VERSION = 0.9.0
COSIGN_VERSION = 2.2.4
GORELEASER_VERSION = 2.0.0
COSIGN_VERSION = 2.4.0
GORELEASER_VERSION = 2.2.0

# Dependency binaries
GOLANGCI_LINT_BIN := golangci-lint
LICENSEI_BIN := licensei
GORELEASER_BIN := goreleaser

# TODO: add support for hadolint and yamllint dependencies
HADOLINT_BIN := hadolint
YAMLLINT_BIN := yamllint

# If we have "bin" dir, use those binaries instead
ifneq ($(wildcard ./bin/.),)
GOLANGCI_LINT_BIN := bin/$(GOLANGCI_LINT_BIN)
Expand All @@ -103,7 +103,7 @@ endif

bin/golangci-lint:
@mkdir -p bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- v${GOLANGCI_VERSION}
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- v${GOLANGCI_LINT_VERSION}

bin/licensei:
@mkdir -p bin
Expand Down
2 changes: 1 addition & 1 deletion cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func loadStore(path string) (*v1alpha1.SecretStoreSpec, error) {
}

// Unmarshal (convert YAML to JSON)
var storeConfig = struct {
storeConfig := struct {
SecretsStore v1alpha1.SecretStoreSpec `json:"secretsStore"`
}{}

Expand Down
Loading

0 comments on commit 48f8cfa

Please sign in to comment.