mirror of
https://github.com/gradle/actions.git
synced 2025-04-20 09:49:19 +08:00
Remove the undocumented 'dependency-graph: clear' option
This commit is contained in:
parent
12cb23c359
commit
32f9239e2c
@ -80,7 +80,7 @@ inputs:
|
|||||||
dependency-graph:
|
dependency-graph:
|
||||||
description: |
|
description: |
|
||||||
Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how.
|
Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how.
|
||||||
Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-and-upload', 'download-and-submit' and 'clear'.
|
Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-and-upload', and 'download-and-submit'.
|
||||||
required: false
|
required: false
|
||||||
default: 'disabled'
|
default: 'disabled'
|
||||||
|
|
||||||
|
@ -22,11 +22,9 @@ export class DependencyGraphConfig {
|
|||||||
return DependencyGraphOption.GenerateAndUpload
|
return DependencyGraphOption.GenerateAndUpload
|
||||||
case 'download-and-submit':
|
case 'download-and-submit':
|
||||||
return DependencyGraphOption.DownloadAndSubmit
|
return DependencyGraphOption.DownloadAndSubmit
|
||||||
case 'clear':
|
|
||||||
return DependencyGraphOption.Clear
|
|
||||||
}
|
}
|
||||||
throw TypeError(
|
throw TypeError(
|
||||||
`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit, clear]. The default value is 'disabled'.`
|
`The value '${val}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-and-upload, download-and-submit]. The default value is 'disabled'.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,8 +78,7 @@ export enum DependencyGraphOption {
|
|||||||
Generate = 'generate',
|
Generate = 'generate',
|
||||||
GenerateAndSubmit = 'generate-and-submit',
|
GenerateAndSubmit = 'generate-and-submit',
|
||||||
GenerateAndUpload = 'generate-and-upload',
|
GenerateAndUpload = 'generate-and-upload',
|
||||||
DownloadAndSubmit = 'download-and-submit',
|
DownloadAndSubmit = 'download-and-submit'
|
||||||
Clear = 'clear'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CacheConfig {
|
export class CacheConfig {
|
||||||
|
@ -36,12 +36,6 @@ export async function setup(config: DependencyGraphConfig): Promise<void> {
|
|||||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext())
|
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext())
|
||||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', getWorkspaceDirectory())
|
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', getWorkspaceDirectory())
|
||||||
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory())
|
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory())
|
||||||
|
|
||||||
// To clear the dependency graph, we generate an empty graph by excluding all projects and configurations
|
|
||||||
if (option === DependencyGraphOption.Clear) {
|
|
||||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '')
|
|
||||||
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function maybeExportVariable(variableName: string, value: unknown): void {
|
function maybeExportVariable(variableName: string, value: unknown): void {
|
||||||
@ -59,7 +53,6 @@ export async function complete(config: DependencyGraphConfig): Promise<void> {
|
|||||||
case DependencyGraphOption.DownloadAndSubmit: // Performed in setup
|
case DependencyGraphOption.DownloadAndSubmit: // Performed in setup
|
||||||
return
|
return
|
||||||
case DependencyGraphOption.GenerateAndSubmit:
|
case DependencyGraphOption.GenerateAndSubmit:
|
||||||
case DependencyGraphOption.Clear: // Submit the empty dependency graph
|
|
||||||
await findAndSubmitDependencyGraphs(config)
|
await findAndSubmitDependencyGraphs(config)
|
||||||
return
|
return
|
||||||
case DependencyGraphOption.GenerateAndUpload:
|
case DependencyGraphOption.GenerateAndUpload:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user