Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 10 additions & 6 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
**/*.adoc
examples/**

- name: List all changed files (for troubleshooting)
- name: Summarize changed files (for troubleshooting)
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
CHANGED_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
# Use printf and quoted variables to prevent word splitting/execution
printf '%s\n' "$ALL_CHANGED_FILES" | while IFS= read -r file; do
echo "Changed: $file"
done
echo "Changed files matching build paths: ${CHANGED_COUNT}"
# Avoid passing the full file list via env (ARG_MAX); show a small sample only.
git diff --name-only "${BASE_SHA}" "${HEAD_SHA}" | head -20
if [ "${CHANGED_COUNT}" -gt 20 ]; then
echo "... and $(( CHANGED_COUNT - 20 )) more"
fi

# Generate image tags and build args
- name: Prepare build variables
Expand Down
2 changes: 1 addition & 1 deletion .rhdh/docker/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ WORKDIR /opt/app-root/src/helm
RUN set -eu; \
. /cachi2/cachi2.env; \
HELM_VERSION=$(grep '^HELM_VERSION' /tmp/Makefile | sed 's/.*:= *//'); \
CGO_ENABLED=0 go build -trimpath \
CGO_ENABLED=0 go build -mod=vendor -trimpath \
-ldflags "-X helm.sh/helm/v4/internal/version.version=v${HELM_VERSION}" \
-o /tmp/helm ./cmd/helm && \
/tmp/helm version
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY Makefile /tmp/Makefile
COPY vendor/helm /opt/app-root/src/helm
WORKDIR /opt/app-root/src/helm
RUN HELM_VERSION=$(grep '^HELM_VERSION' /tmp/Makefile | sed 's/.*:= *//') && \
CGO_ENABLED=0 go build -trimpath \
CGO_ENABLED=0 go build -mod=vendor -trimpath \
-ldflags "-X helm.sh/helm/v4/internal/version.version=v${HELM_VERSION}" \
-o /tmp/helm ./cmd/helm && \
/tmp/helm version
Expand Down
20 changes: 19 additions & 1 deletion hack/update-vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ prune_helm() {
find "$dir" -type d -name testdata -exec rm -rf {} +
}

finalize_helm() {
local dir="$1"

if ! command -v go &>/dev/null; then
echo "Error: go is required to vendor Helm module dependencies"
exit 1
fi

# Drop test-only requires and vendor external modules for hermetic (cachi2) builds.
(cd "$dir" && go mod tidy && go mod vendor)

# Verify the pruned tree still builds offline with vendored deps.
(cd "$dir" && CGO_ENABLED=0 go build -mod=vendor -trimpath -o /dev/null ./cmd/helm)
}

prune_websocat() {
local dir="$1"

Expand All @@ -103,7 +118,10 @@ prune_websocat() {
}

case "$NAME" in
helm) prune_helm "$PREFIX" ;;
helm)
prune_helm "$PREFIX"
finalize_helm "$PREFIX"
;;
websocat) prune_websocat "$PREFIX" ;;
esac

Expand Down
11 changes: 1 addition & 10 deletions vendor/helm/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 0 additions & 63 deletions vendor/helm/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/helm/vendor/dario.cat/mergo/.deepsource.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions vendor/helm/vendor/dario.cat/mergo/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/helm/vendor/dario.cat/mergo/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading