Commit 750cdda3 authored by bigdaz's avatar bigdaz Committed by github-actions[bot]
Browse files

[bot] Update dist directory

parent c198d848
Loading
Loading
Loading
Loading
+22 −14
Changes for dist/dependency-submission/main/index.js: 22 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
    getJobCorrelator() {
        return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
    }
    getReportDirectory() {
        return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
    }
    static constructJobCorrelator(workflow, jobId, matrixJson) {
        const matrixString = this.describeMatrix(matrixJson);
        const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
@@ -144694,7 +144697,7 @@ async function setup(config) {
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
    maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
    maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
    if (option === configuration_1.DependencyGraphOption.Clear) {
        core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
        core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
@@ -144716,10 +144719,10 @@ async function complete(config) {
                return;
            case configuration_1.DependencyGraphOption.GenerateAndSubmit:
            case configuration_1.DependencyGraphOption.Clear:
                await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
                await submitDependencyGraphs(await findDependencyGraphFiles());
                return;
            case configuration_1.DependencyGraphOption.GenerateAndUpload:
                await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
                await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
        }
    }
    catch (e) {
@@ -144727,11 +144730,11 @@ async function complete(config) {
    }
}
exports.complete = complete;
async function findGeneratedDependencyGraphFiles() {
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
    return await findDependencyGraphFiles(workspaceDirectory);
}
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph upload not supported in the ACT environment.');
        core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
@@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
    }
}
async function submitDependencyGraphs(dependencyGraphFiles) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to submit.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph submit not supported in the ACT environment.');
        core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
@@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
    core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
}
async function downloadDependencyGraphs() {
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
@@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            path: downloadPath,
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles(downloadPath);
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles(dir) {
    const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
function getReportDirectory() {
    return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
}
function isProcessed(dependencyGraphFile) {
    const markerFile = `${dependencyGraphFile}.processed`;
    return fs_1.default.existsSync(markerFile);
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+3
Changes for dist/dependency-submission/post/index.js: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -95773,6 +95773,9 @@ class DependencyGraphConfig {
    getJobCorrelator() {
        return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
    }
    getReportDirectory() {
        return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
    }
    static constructJobCorrelator(workflow, jobId, matrixJson) {
        const matrixString = this.describeMatrix(matrixJson);
        const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+22 −14
Changes for dist/setup-gradle/main/index.js: 22 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
    getJobCorrelator() {
        return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
    }
    getReportDirectory() {
        return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
    }
    static constructJobCorrelator(workflow, jobId, matrixJson) {
        const matrixString = this.describeMatrix(matrixJson);
        const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
@@ -144694,7 +144697,7 @@ async function setup(config) {
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
    maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
    maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
    maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
    if (option === configuration_1.DependencyGraphOption.Clear) {
        core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
        core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
@@ -144716,10 +144719,10 @@ async function complete(config) {
                return;
            case configuration_1.DependencyGraphOption.GenerateAndSubmit:
            case configuration_1.DependencyGraphOption.Clear:
                await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
                await submitDependencyGraphs(await findDependencyGraphFiles());
                return;
            case configuration_1.DependencyGraphOption.GenerateAndUpload:
                await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
                await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
        }
    }
    catch (e) {
@@ -144727,11 +144730,11 @@ async function complete(config) {
    }
}
exports.complete = complete;
async function findGeneratedDependencyGraphFiles() {
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
    return await findDependencyGraphFiles(workspaceDirectory);
}
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph upload not supported in the ACT environment.');
        core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
@@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
    }
}
async function submitDependencyGraphs(dependencyGraphFiles) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to submit.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph submit not supported in the ACT environment.');
        core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
@@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
    core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
}
async function downloadDependencyGraphs() {
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
@@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            path: downloadPath,
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles(downloadPath);
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles(dir) {
    const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
function getReportDirectory() {
    return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
}
function isProcessed(dependencyGraphFile) {
    const markerFile = `${dependencyGraphFile}.processed`;
    return fs_1.default.existsSync(markerFile);
Loading