From c50b444ebb2a379a8b30528c634d02afd58b7b41 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 1 Apr 2023 03:08:54 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- scripts/gitlab_component_helpers.sh | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'scripts') diff --git a/scripts/gitlab_component_helpers.sh b/scripts/gitlab_component_helpers.sh index cf9b042b529..301d4fb5d37 100644 --- a/scripts/gitlab_component_helpers.sh +++ b/scripts/gitlab_component_helpers.sh @@ -163,7 +163,7 @@ function check_fixtures_download() { return 1 fi - # Note: Currently, reusing frontend fixtures is only supported in EE. + # Note: Currently, reusing frontend fixtures is only supported in EE. # Other projects will be supported through this issue in the future: https://gitlab.com/gitlab-org/gitlab/-/issues/393615. if [[ "${CI_PROJECT_NAME}" != "gitlab" ]] || [[ "${CI_JOB_NAME}" =~ "foss" ]]; then return 1 @@ -172,7 +172,7 @@ function check_fixtures_download() { if [[ -z "${CI_MERGE_REQUEST_IID:-}" ]]; then return 1 else - if only_js_files_changed && ! fixtures_archive_doesnt_exist; then + if tooling/bin/find_only_js_changes && ! fixtures_archive_doesnt_exist; then return 0 else return 1 @@ -221,30 +221,6 @@ function fixtures_directory_exists() { fi } -function only_js_files_changed { - local target_branch_sha="${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-}" - local source_branch_sha="${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-}" - - if [[ -z "${target_branch_sha}" || -z "${source_branch_sha}" ]]; then - echoinfo "The commit hash(es) provided are missing or are empty." - echoinfo "Please provide valid commit hash(es)." - return 1 - fi - - local changed_files - changed_files=$(git diff --name-only "${target_branch_sha}..${source_branch_sha}") - - for file in $changed_files; do - if [[ ! $file = *.js ]]; then - echoinfo "Changes were made to files other than JS files" - return 1 - fi - done - - echoinfo "Only JS files were changed" - return 0 -} - function upload_fixtures_package() { upload_package "${FIXTURES_PACKAGE}" "${FIXTURES_PACKAGE_URL}" } -- cgit v1.2.1