Skip to content

Commit

Permalink
cleanup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ntruchsess committed Feb 6, 2024
1 parent acf8d1a commit 7bccd7c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 56 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/pre-checks.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
23 changes: 0 additions & 23 deletions scripts/check_package_versions.sh

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/check_package_versions_local.sh

This file was deleted.

7 changes: 4 additions & 3 deletions scripts/nuget_version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Get branch names
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <branchRange>"
echo "Usage: $0 <baseBranch|branchRange>"
exit 1
fi

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_framework_versions.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/framework/Framework.Async/AsyncGroupByExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public static class AsyncGroupByExtensions
{
public static async IAsyncEnumerable<IGrouping<TKey, TElement>> PreSortedGroupBy<T, TKey, TElement>(this IAsyncEnumerable<T> Data, Func<T, TKey> KeySelector, Func<T, TElement> ElementSelector) where T : notnull where TKey : notnull
{
var foo = "bar";

Check warning on line 27 in src/framework/Framework.Async/AsyncGroupByExtensions.cs

View workflow job for this annotation

GitHub Actions / Build, check and test services (7.0)

Unnecessary assignment of a value to 'foo'

await using var enumerator = Data.GetAsyncEnumerator();

var hasNext = await enumerator.MoveNextAsync().ConfigureAwait(false);
Expand Down

0 comments on commit 7bccd7c

Please sign in to comment.