From ec21fb8251c34d535fd0c5e08f354cfa22c25320 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Thu, 18 Apr 2024 19:31:43 -0300 Subject: [PATCH] chore: Revert "Check working copy is clean before extract-repo (#5851)" This reverts commit 8ff9767c213d172ee1568aeedaa7265ead7b5466. --- build-system/scripts/check_working_copy_clean | 21 ------------------- build-system/scripts/extract_repo | 5 ----- 2 files changed, 26 deletions(-) delete mode 100755 build-system/scripts/check_working_copy_clean diff --git a/build-system/scripts/check_working_copy_clean b/build-system/scripts/check_working_copy_clean deleted file mode 100755 index 8adb9f90852..00000000000 --- a/build-system/scripts/check_working_copy_clean +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# If this script fails (nonzero exit), then the working copy is not clean. - -[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace -set -eu - -REPOSITORY=$1 - -# Get list of rebuild patterns, concat them with regex 'or' (|), and double escape \ for awk -v. -AWK_PATTERN=$(query_manifest rebuildPatterns $REPOSITORY | tr '\n' '|' | sed 's/\\/\\\\/g') -# Remove the trailing '|'. -AWK_PATTERN=${AWK_PATTERN%|} - -cd "$(git rev-parse --show-toplevel)" - -# Check if there is anything dirty in the local copy, if so, bail with non-zero exit code. -CHANGED_FILES=$(git status --porcelain | awk -v pattern="($AWK_PATTERN)" '$2 ~ pattern {print $2}') -if [ -n "$CHANGED_FILES" ]; then - echo $CHANGED_FILES - exit 1 -fi \ No newline at end of file diff --git a/build-system/scripts/extract_repo b/build-system/scripts/extract_repo index 94d435962b3..9adadf2d62c 100755 --- a/build-system/scripts/extract_repo +++ b/build-system/scripts/extract_repo @@ -7,11 +7,6 @@ set -eu REPOSITORY=$1 shift -if ! check_working_copy_clean $REPOSITORY; then - echo "The working copy for $REPOSITORY or one of its dependencies as listed in build manifest is not clean. Aborting extract_repo." - exit 1 -fi - IMAGE_COMMIT_URI=$(calculate_image_uri $REPOSITORY) if docker image ls --format "{{.Repository}}:{{.Tag}}" | grep -q -w "$IMAGE_COMMIT_URI$"; then echo -e "Image exists locally. No need to pull."