Skip to content

build: Upgrade tools (#24 #24

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

Merged
merged 2 commits into from
Feb 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
6 changes: 3 additions & 3 deletions .go-tools
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/oligot/[email protected]
github.com/segmentio/[email protected]
gotest.tools/[email protected]
sigs.k8s.io/controller-runtime/tools/[email protected]20230131195449-5db173878d6d
github.com/google/go-containerregistry/cmd/crane@v0.12.1
github.com/drone/envsubst/cmd/[email protected] # FREEZE
sigs.k8s.io/controller-runtime/tools/[email protected]20230208013708-22718275bffe
github.com/google/go-containerregistry/cmd/crane@v0.13.0
github.com/drone/envsubst/cmd/[email protected]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ repos:
- --comment-style
- <!--|| -->
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
rev: v1.11.0
hooks:
- id: helm-docs
stages: [commit]
Expand Down
15 changes: 7 additions & 8 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
clusterctl 1.3.3
flux2 0.39.0
gcloud 416.0.0
gcloud 416.0.0
gcloud 417.0.1
ginkgo 2.8.0
gojq 0.12.11
golang 1.20
golangci-lint 1.51.0
goreleaser 1.15.0
helm 3.11.0
golangci-lint 1.51.1
goreleaser 1.15.2
helm 3.11.1
helm-docs 1.11.0
kind 0.17.0
kube-controller-tools 0.11.2
kube-controller-tools 0.11.3
kubectl 1.26.1
kustomize 4.5.7
pre-commit 3.0.2
kustomize 5.0.0
pre-commit 3.0.4
shfmt 3.6.0
upx 4.0.2
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

FROM --platform=linux/amd64 gcr.io/distroless/static@sha256:93bb1b564033909a660111671303f9683e13f0567de95e4b6fde3226e532955e as linux-amd64
FROM --platform=linux/arm64 gcr.io/distroless/static@sha256:72fec9960c247e7e68ed1db4b5b561f6b6da437215fb41d5fd7df790ec6df1a7 as linux-arm64
FROM --platform=linux/amd64 gcr.io/distroless/static@sha256:b1a9ecc1b37ec3bc9a2d8f8a0a5090ee5babda422f2b1c3724f108fa7e506e77 as linux-amd64
FROM --platform=linux/arm64 gcr.io/distroless/static@sha256:2fc464bd828a7f713020c06f0bb4ff01670d08292ba4a01ffbc3b56a1d59da3a as linux-arm64

FROM --platform=linux/${TARGETARCH} linux-${TARGETARCH}

Expand Down
20 changes: 15 additions & 5 deletions make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,18 @@ upgrade-tools: upgrade-go-tools; $(info $(M) upgrading all tools to latest avail
upgrade-go-tools: ## Upgrades all go tools to latest available versions
upgrade-go-tools: install-tool.golang; $(info $(M) upgrading all go tools to latest available versions)
grep -v '# FREEZE' .go-tools | \
grep -Eo '^[^#]\S+' | \
sed 's/@.\+$$/@latest/' | \
xargs -I {} bash -ec '\
export LATEST_VERSION=$$(go list -m {}) && \
sed -i "s|$${LATEST_VERSION%% *}@.\+$$|$${LATEST_VERSION/ /@}|" .go-tools'
grep -Eo '^[^#][^@]+' | \
xargs -I {} bash -ec ' \
original_module_path={}; \
module_path={}; \
while [ "$${module_path}" != "." ]; do \
LATEST_VERSION=$$(go list -m $${module_path}@latest 2>/dev/null || echo ""); \
if [ -n "$${LATEST_VERSION}" ]; then \
sed -i "s|$${original_module_path}@.\+$$|$${original_module_path}@$${LATEST_VERSION#* }|" .go-tools; \
exit; \
else \
module_path=$$(dirname $${module_path}); \
fi; \
done; \
echo "Failed to find latest module version for $${original_module_path}"; \
exit 1'