From 5418a0bee63fd44803bb14d460d15ae4b0662c37 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:01:12 -0300 Subject: [PATCH] fix(mingit): remove mingit BE-12245 (#1177) --- binary-version.json | 3 +-- build/download_binaries.sh | 13 +------------ build/download_mingit_binary.sh | 18 ------------------ build/windows/Dockerfile | 2 -- 4 files changed, 2 insertions(+), 34 deletions(-) delete mode 100755 build/download_mingit_binary.sh diff --git a/binary-version.json b/binary-version.json index 7a275ec82..dfc688191 100644 --- a/binary-version.json +++ b/binary-version.json @@ -1,4 +1,3 @@ { - "docker": "v28.3.0", - "mingit": "2.49.0.1" + "docker": "v28.3.0" } diff --git a/build/download_binaries.sh b/build/download_binaries.sh index 7494d94d3..7054ec1d1 100755 --- a/build/download_binaries.sh +++ b/build/download_binaries.sh @@ -7,11 +7,10 @@ ARCH=${2:-"amd64"} BINARY_VERSION_FILE="./binary-version.json" dockerVersion=$(jq -r '.docker' < "${BINARY_VERSION_FILE}") -mingitVersion=$(jq -r '.mingit' < "${BINARY_VERSION_FILE}") mkdir -p dist -echo "Checking and downloading binaries for docker ${dockerVersion}, and mingit ${mingitVersion} (Windows only)" +echo "Checking and downloading binaries for docker ${dockerVersion}" # Determine the binary file names based on the platform dockerBinary="dist/docker" @@ -27,13 +26,3 @@ if [ ! -f "$dockerBinary" ]; then else echo "Docker binary already exists, skipping download." fi - -# Check and download mingit binary only for Windows -if [ "$PLATFORM" == "windows" ]; then - if [ ! -f "dist/mingit" ]; then - echo "Downloading mingit binary..." - /usr/bin/env bash ./build/download_mingit_binary.sh "$PLATFORM" "$ARCH" "$mingitVersion" - else - echo "Mingit binary already exists, skipping download." - fi -fi diff --git a/build/download_mingit_binary.sh b/build/download_mingit_binary.sh deleted file mode 100755 index aec63b745..000000000 --- a/build/download_mingit_binary.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [[ $# -ne 3 ]]; then - echo "Illegal number of parameters" >&2 - exit 1 -fi - -PLATFORM=$1 -MINGIT_VERSION=$3 - -if [[ ${PLATFORM} == "windows" ]]; then - GIT_VERSION=$(echo $MINGIT_VERSION | cut -d "." -f 1-3) - GIT_PATCH_VERSION=$(echo $MINGIT_VERSION | cut -d "." -f 4) - - wget --tries=3 --waitretry=30 --quiet "https://github.com/git-for-windows/git/releases/download/v$GIT_VERSION.windows.$GIT_PATCH_VERSION/MinGit-$GIT_VERSION-busybox-64-bit.zip" - unzip "MinGit-$GIT_VERSION-busybox-64-bit.zip" -d dist/mingit -fi diff --git a/build/windows/Dockerfile b/build/windows/Dockerfile index 615744a83..9e5e080fc 100644 --- a/build/windows/Dockerfile +++ b/build/windows/Dockerfile @@ -2,13 +2,11 @@ ARG OSVERSION FROM --platform=linux/amd64 gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-${OSVERSION} as core FROM mcr.microsoft.com/windows/nanoserver:${OSVERSION} as production -ENV PATH "C:\mingit\cmd;C:\Windows\system32;C:\Windows;" COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll USER ContainerAdministrator -COPY dist/mingit/ mingit/ COPY dist/docker.exe / COPY dist/mustache-templates /mustache-templates/ COPY dist/portainer.exe /