mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Ensure an engine-only ruby-version picks the latest stable version and not a preview or RC
This commit is contained in:
@@ -28,6 +28,10 @@ export function isHeadVersion(rubyVersion) {
|
||||
return rubyVersion === 'head' || rubyVersion === 'debug' || rubyVersion === 'mingw' || rubyVersion === 'mswin'
|
||||
}
|
||||
|
||||
export function isStableVersion(rubyVersion) {
|
||||
return /^\d+(\.\d+)*$/.test(rubyVersion)
|
||||
}
|
||||
|
||||
export async function hashFile(file) {
|
||||
// See https://github.com/actions/runner/blob/master/src/Misc/expressionFunc/hashFiles/src/hashFiles.ts
|
||||
const hash = crypto.createHash('sha256')
|
||||
|
||||
Reference in New Issue
Block a user