mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 09:58:56 +08:00 
			
		
		
		
	Remove defunct generate actions
This commit is contained in:
		@@ -1,24 +0,0 @@
 | 
			
		||||
import * as core from '@actions/core'
 | 
			
		||||
 | 
			
		||||
import * as provisioner from './provision'
 | 
			
		||||
import * as dependencyGraph from './dependency-graph'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The main entry point for the action, called by Github Actions for the step.
 | 
			
		||||
 */
 | 
			
		||||
export async function run(): Promise<void> {
 | 
			
		||||
    try {
 | 
			
		||||
        // Download and install Gradle if required
 | 
			
		||||
        const executable = await provisioner.provisionGradle()
 | 
			
		||||
 | 
			
		||||
        // Generate and upload dependency graph artifact
 | 
			
		||||
        await dependencyGraph.generateDependencyGraph(executable)
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        core.setFailed(String(error))
 | 
			
		||||
        if (error instanceof Error && error.stack) {
 | 
			
		||||
            core.info(error.stack)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
run()
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
import * as core from '@actions/core'
 | 
			
		||||
import * as dependencyGraph from './dependency-graph'
 | 
			
		||||
 | 
			
		||||
export async function run(): Promise<void> {
 | 
			
		||||
    try {
 | 
			
		||||
        // Retrieve the dependency graph artifact and submit via Dependency Submission API
 | 
			
		||||
        await dependencyGraph.downloadAndSubmitDependencyGraphs()
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        core.setFailed(String(error))
 | 
			
		||||
        if (error instanceof Error && error.stack) {
 | 
			
		||||
            core.info(error.stack)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
run()
 | 
			
		||||
@@ -8,7 +8,6 @@ import {Octokit} from '@octokit/rest'
 | 
			
		||||
import * as path from 'path'
 | 
			
		||||
import fs from 'fs'
 | 
			
		||||
 | 
			
		||||
import * as execution from './execution'
 | 
			
		||||
import * as layout from './repository-layout'
 | 
			
		||||
import {DependencyGraphOption, getJobMatrix} from './input-params'
 | 
			
		||||
 | 
			
		||||
@@ -45,15 +44,7 @@ export async function complete(option: DependencyGraphOption): Promise<void> {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function generateDependencyGraph(executable: string | undefined): Promise<void> {
 | 
			
		||||
    const buildRootDirectory = layout.buildRootDirectory()
 | 
			
		||||
 | 
			
		||||
    const args = [':GitHubDependencyGraphPlugin_generateDependencyGraph']
 | 
			
		||||
 | 
			
		||||
    await execution.executeGradleBuild(executable, buildRootDirectory, args)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function uploadDependencyGraphs(): Promise<string[]> {
 | 
			
		||||
async function uploadDependencyGraphs(): Promise<string[]> {
 | 
			
		||||
    const workspaceDirectory = layout.workspaceDirectory()
 | 
			
		||||
    const graphFiles = await findDependencyGraphFiles(workspaceDirectory)
 | 
			
		||||
 | 
			
		||||
@@ -66,7 +57,7 @@ export async function uploadDependencyGraphs(): Promise<string[]> {
 | 
			
		||||
    return graphFiles
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function downloadAndSubmitDependencyGraphs(): Promise<void> {
 | 
			
		||||
async function downloadAndSubmitDependencyGraphs(): Promise<void> {
 | 
			
		||||
    const workspaceDirectory = layout.workspaceDirectory()
 | 
			
		||||
    submitDependencyGraphs(await retrieveDependencyGraphs(workspaceDirectory))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user