From 7bccd7c8f8a61fd42f3564a5b3db88ee9b4b1e48 Mon Sep 17 00:00:00 2001 From: Norbert Truchsess Date: Tue, 6 Feb 2024 13:04:56 +0100 Subject: [PATCH] cleanup scripts --- .github/workflows/pre-checks.yml | 9 ++------ scripts/check_package_versions.sh | 23 ------------------- scripts/check_package_versions_local.sh | 22 ------------------ scripts/nuget_version_check.sh | 7 +++--- scripts/update_framework_versions.sh | 2 +- .../Framework.Async/AsyncGroupByExtensions.cs | 2 ++ 6 files changed, 9 insertions(+), 56 deletions(-) delete mode 100755 scripts/check_package_versions.sh delete mode 100755 scripts/check_package_versions_local.sh diff --git a/.github/workflows/pre-checks.yml b/.github/workflows/pre-checks.yml index c25d0eb3b5..b64e933f3d 100644 --- a/.github/workflows/pre-checks.yml +++ b/.github/workflows/pre-checks.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -28,11 +28,6 @@ on: types: [opened, synchronize, reopened] workflow_dispatch: -env: - # variables needed for scripts/check_package_versions.sh - BASE_NAME: "${{ github.event.pull_request.base.ref }}" - HEAD_NAME: "${{ github.event.pull_request.head.ref }}" - jobs: changes: @@ -88,7 +83,7 @@ jobs: - name: Check Package Versions shell: bash run: | - script_output=$(./scripts/check_package_versions.sh) + script_output=$(./scripts/nuget_version_check.sh origin/${{ github.event.pull_request.base.ref }}) if [ -z "$script_output" ]; then echo "Expected version updates were made" diff --git a/scripts/check_package_versions.sh b/scripts/check_package_versions.sh deleted file mode 100755 index cf26739f76..0000000000 --- a/scripts/check_package_versions.sh +++ /dev/null @@ -1,23 +0,0 @@ -############################################################### -# Copyright (c) 2024 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -#!/bin/bash - - -. ./scripts/nuget_version_check.sh "$BASE_NAME..$HEAD_NAME" diff --git a/scripts/check_package_versions_local.sh b/scripts/check_package_versions_local.sh deleted file mode 100755 index 9ff0b9558a..0000000000 --- a/scripts/check_package_versions_local.sh +++ /dev/null @@ -1,22 +0,0 @@ -############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -#!/bin/bash - -. ./scripts/nuget_version_check.sh "" \ No newline at end of file diff --git a/scripts/nuget_version_check.sh b/scripts/nuget_version_check.sh index e74c11c1a8..048024efb4 100755 --- a/scripts/nuget_version_check.sh +++ b/scripts/nuget_version_check.sh @@ -21,7 +21,7 @@ # Get branch names if [ "$#" -ne 1 ]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi @@ -30,18 +30,19 @@ branchRange="$1" # Initialize a global arrays to store data version_update_needed=() -first_version="" -unmatching_package=() check_version_update(){ local project="$1" local props_file=$project"Directory.Build.props" + # check if the code (.cs) unchanged if ! git diff --name-only $branchRange -- "$project" | grep -qE '\.cs$' || + # check if build.props file has been deleted ! [ -z $(git diff --name-only --diff-filter=D $branchRange -- "$props_file") ]; then return fi + # check if build.props file is unchanged if [ -z $(git diff --name-only $branchRange -- "$props_file") ]; then version_update_needed+=($project) return diff --git a/scripts/update_framework_versions.sh b/scripts/update_framework_versions.sh index cc7e65d8e4..50cffadcb9 100755 --- a/scripts/update_framework_versions.sh +++ b/scripts/update_framework_versions.sh @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2024Contributors to the Eclipse Foundation +# Copyright (c) 2024 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/src/framework/Framework.Async/AsyncGroupByExtensions.cs b/src/framework/Framework.Async/AsyncGroupByExtensions.cs index 72592f78d3..6878895c02 100644 --- a/src/framework/Framework.Async/AsyncGroupByExtensions.cs +++ b/src/framework/Framework.Async/AsyncGroupByExtensions.cs @@ -24,6 +24,8 @@ public static class AsyncGroupByExtensions { public static async IAsyncEnumerable> PreSortedGroupBy(this IAsyncEnumerable Data, Func KeySelector, Func ElementSelector) where T : notnull where TKey : notnull { + var foo = "bar"; + await using var enumerator = Data.GetAsyncEnumerator(); var hasNext = await enumerator.MoveNextAsync().ConfigureAwait(false);