Skip to content

Commit

Permalink
GH-2288 - Polishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Feb 1, 2025
1 parent c1ea6bf commit 05b4279
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions etc/mappings.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
assertj=AssertJ
jackson-bom=Jackson
junit=JUnit
kotlin=Kotlin
Expand Down
13 changes: 8 additions & 5 deletions etc/update-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -z "$1" ] || [[ ! "$1" =~ ^(bugfix|minor|major)$ ]]; then
fi

# Check GH milestones extension installed
if [ -z $(gh extension list | grep "^gh milestone") ]; then
if [ -z "$(gh extension list | grep "^gh milestone")" ]; then
echo "gh milestones extension not installed. Install via: gh extension install valeriobelli/gh-milestone."
exit 1;
fi
Expand Down Expand Up @@ -60,13 +60,17 @@ while IFS= read -r line; do

if [[ $line =~ \$\{([[:alnum:]-]+)\.version\}[[:space:]\.]*([0-9]+\.[0-9]+\.[0-9]+.*)[[:space:]]\-\>[[:space:]]([0-9]+\.[0-9]+\.[0-9]+.*) ]]; then

echo "---"
echo "Processing line: $line"

property_name="${BASH_REMATCH[1]}"
old_version="${BASH_REMATCH[2]}"
new_version="${BASH_REMATCH[3]}"

# Skip if new version matches pattern (case insensitive)
if echo "$new_version" | grep -qiE "(-m[0-9]|-rc[0-9]|alpha|beta)"; then
echo "Skipping milestone/alpha/beta version: $new_version"
echo "Skipping preview version: $new_version."
echo "---"
continue
fi

Expand Down Expand Up @@ -94,8 +98,6 @@ while IFS= read -r line; do
fi

matches_found=$((matches_found + 1))

echo "Processing line: $line"

# Look up the mapping directly
mapping=$(grep "^${property_name}=" "$mapping_file" | cut -d '=' -f2)
Expand Down Expand Up @@ -136,7 +138,8 @@ while IFS= read -r line; do
echo "Pushed changes and closed issue GH-${issue_number}"
echo "---"
else
echo "Warning: No mapping found for property: $property_name"
echo "No mapping found for property: $property_name. Skipping."
echo "---"
fi
fi
done < "$mvn_output_file"
Expand Down

0 comments on commit 05b4279

Please sign in to comment.