Skip to content

Commit 586d6c5

Browse files
authored
Merge pull request #127 from mallardduck/auto-bump-sort-bug
[ci] 2 bug fixes
2 parents 459e6f9 + 7f0b602 commit 586d6c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/scripts/bump-kubectl-patch-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RELEASES=$(gh api graphql -F owner='kubernetes' -F name='kubernetes' -f query='q
2121
while IFS= read -r VERSION; do
2222
PREFIX=$(echo "$VERSION" | cut -d. -f1,2)
2323
echo "Checking version for $VERSION - using $PREFIX to search..."
24-
NEWEST_OPTION=$(echo "$RELEASES"| grep "$PREFIX" | sort -rn |head -1)
24+
NEWEST_OPTION=$(echo "$RELEASES"| grep "$PREFIX" | sort -rV |head -1)
2525
if [ "$VERSION" == "$NEWEST_OPTION" ]; then
2626
echo "Nothing to update - $VERSION already newest patch for that Major.Minor"
2727
# If the version is the same, keep the original line

.github/workflows/kubectl-create-bump-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
- name: Check for changes
6262
if: ${{ env.is_supported == 'true' }}
6363
run: |
64-
rm -f .github/scripts/update-script.sh
65-
git restore --staged --worktree .github/scripts/update-script.sh || true
64+
rm -f .github/scripts/bump-kubectl-patch-versions
65+
git restore --staged --worktree .github/scripts/bump-kubectl-patch-versions || true
6666
6767
if git diff --quiet; then
6868
echo "No changes detected."

0 commit comments

Comments
 (0)