mirror of
https://github.com/gradle/actions.git
synced 2025-12-08 17:15:46 +08:00
Deprecate 'wrapper-validation-action'
Deprecation warning will be emitted when we: - Change 'wrapper-validation-action' to delegate to 'actions/wrapper-validation' - Add the 'wrapper-validation-action' id as env var before delegating
This commit is contained in:
@@ -2,10 +2,20 @@ import * as path from 'path'
|
||||
import * as core from '@actions/core'
|
||||
|
||||
import * as validate from './validate'
|
||||
import {getActionId, setActionId} from '../configuration'
|
||||
import {recordDeprecation, emitDeprecationWarnings} from '../deprecation-collector'
|
||||
import {handleMainActionError} from '../errors'
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
if (getActionId() === 'gradle/wrapper-validation-action') {
|
||||
recordDeprecation(
|
||||
'The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`'
|
||||
)
|
||||
} else {
|
||||
setActionId('gradle/actions/wrapper-validation')
|
||||
}
|
||||
|
||||
const result = await validate.findInvalidWrapperJars(
|
||||
path.resolve('.'),
|
||||
+core.getInput('min-wrapper-count'),
|
||||
@@ -22,6 +32,8 @@ export async function run(): Promise<void> {
|
||||
core.setOutput('failed-wrapper', `${result.invalid.map(w => w.path).join('|')}`)
|
||||
}
|
||||
}
|
||||
|
||||
emitDeprecationWarnings(false)
|
||||
} catch (error) {
|
||||
handleMainActionError(error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user