Skip to content

Commit

Permalink
Append zeros to toolchain versions truncated by GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 14, 2024
1 parent 315e265 commit aacd1c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ runs:
fi
elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then
echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT
elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then
echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT
else
echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit aacd1c2

Please sign in to comment.