Skip to content

Commit 750cdda

Browse files
bigdazgithub-actions[bot]
authored andcommitted
[bot] Update dist directory
1 parent c198d84 commit 750cdda

File tree

10 files changed

+77
-47
lines changed

10 files changed

+77
-47
lines changed

dist/dependency-submission/main/index.js

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
144345144345
getJobCorrelator() {
144346144346
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
144347144347
}
144348+
getReportDirectory() {
144349+
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
144350+
}
144348144351
static constructJobCorrelator(workflow, jobId, matrixJson) {
144349144352
const matrixString = this.describeMatrix(matrixJson);
144350144353
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
@@ -144694,7 +144697,7 @@ async function setup(config) {
144694144697
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
144695144698
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
144696144699
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
144697-
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
144700+
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
144698144701
if (option === configuration_1.DependencyGraphOption.Clear) {
144699144702
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
144700144703
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
@@ -144716,22 +144719,22 @@ async function complete(config) {
144716144719
return;
144717144720
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
144718144721
case configuration_1.DependencyGraphOption.Clear:
144719-
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
144722+
await submitDependencyGraphs(await findDependencyGraphFiles());
144720144723
return;
144721144724
case configuration_1.DependencyGraphOption.GenerateAndUpload:
144722-
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
144725+
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144723144726
}
144724144727
}
144725144728
catch (e) {
144726144729
warnOrFail(config, option, e);
144727144730
}
144728144731
}
144729144732
exports.complete = complete;
144730-
async function findGeneratedDependencyGraphFiles() {
144731-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
144732-
return await findDependencyGraphFiles(workspaceDirectory);
144733-
}
144734144733
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144734+
if (dependencyGraphFiles.length === 0) {
144735+
core.info('No dependency graph files found to upload.');
144736+
return;
144737+
}
144735144738
if (isRunningInActEnvironment()) {
144736144739
core.info('Dependency graph upload not supported in the ACT environment.');
144737144740
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
@@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
144761144764
}
144762144765
}
144763144766
async function submitDependencyGraphs(dependencyGraphFiles) {
144767+
if (dependencyGraphFiles.length === 0) {
144768+
core.info('No dependency graph files found to submit.');
144769+
return;
144770+
}
144764144771
if (isRunningInActEnvironment()) {
144765144772
core.info('Dependency graph submit not supported in the ACT environment.');
144766144773
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
@@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
144802144809
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
144803144810
}
144804144811
async function downloadDependencyGraphs() {
144805-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
144806144812
const findBy = github.context.payload.workflow_run
144807144813
? {
144808144814
token: (0, configuration_1.getGithubToken)(),
@@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
144812144818
}
144813144819
: undefined;
144814144820
const artifactClient = new artifact_1.DefaultArtifactClient();
144815-
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
144816144821
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144817144822
latest: true,
144818144823
findBy
144819-
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144824+
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144820144825
for (const artifact of dependencyGraphArtifacts) {
144821144826
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144822-
path: downloadPath,
144823144827
findBy
144824144828
});
144825144829
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144826144830
}
144827-
return findDependencyGraphFiles(downloadPath);
144831+
return findDependencyGraphFiles();
144828144832
}
144829-
async function findDependencyGraphFiles(dir) {
144830-
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
144833+
async function findDependencyGraphFiles() {
144834+
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144831144835
const allFiles = await globber.glob();
144832144836
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144833144837
unprocessedFiles.forEach(markProcessed);
144838+
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144834144839
return unprocessedFiles;
144835144840
}
144841+
function getReportDirectory() {
144842+
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
144843+
}
144836144844
function isProcessed(dependencyGraphFile) {
144837144845
const markerFile = `${dependencyGraphFile}.processed`;
144838144846
return fs_1.default.existsSync(markerFile);

dist/dependency-submission/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dependency-submission/post/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95773,6 +95773,9 @@ class DependencyGraphConfig {
9577395773
getJobCorrelator() {
9577495774
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
9577595775
}
95776+
getReportDirectory() {
95777+
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
95778+
}
9577695779
static constructJobCorrelator(workflow, jobId, matrixJson) {
9577795780
const matrixString = this.describeMatrix(matrixJson);
9577895781
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;

dist/dependency-submission/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup-gradle/main/index.js

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144345,6 +144345,9 @@ class DependencyGraphConfig {
144345144345
getJobCorrelator() {
144346144346
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
144347144347
}
144348+
getReportDirectory() {
144349+
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
144350+
}
144348144351
static constructJobCorrelator(workflow, jobId, matrixJson) {
144349144352
const matrixString = this.describeMatrix(matrixJson);
144350144353
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
@@ -144694,7 +144697,7 @@ async function setup(config) {
144694144697
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
144695144698
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
144696144699
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
144697-
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
144700+
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
144698144701
if (option === configuration_1.DependencyGraphOption.Clear) {
144699144702
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
144700144703
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
@@ -144716,22 +144719,22 @@ async function complete(config) {
144716144719
return;
144717144720
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
144718144721
case configuration_1.DependencyGraphOption.Clear:
144719-
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
144722+
await submitDependencyGraphs(await findDependencyGraphFiles());
144720144723
return;
144721144724
case configuration_1.DependencyGraphOption.GenerateAndUpload:
144722-
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
144725+
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144723144726
}
144724144727
}
144725144728
catch (e) {
144726144729
warnOrFail(config, option, e);
144727144730
}
144728144731
}
144729144732
exports.complete = complete;
144730-
async function findGeneratedDependencyGraphFiles() {
144731-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
144732-
return await findDependencyGraphFiles(workspaceDirectory);
144733-
}
144734144733
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144734+
if (dependencyGraphFiles.length === 0) {
144735+
core.info('No dependency graph files found to upload.');
144736+
return;
144737+
}
144735144738
if (isRunningInActEnvironment()) {
144736144739
core.info('Dependency graph upload not supported in the ACT environment.');
144737144740
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
@@ -144761,6 +144764,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
144761144764
}
144762144765
}
144763144766
async function submitDependencyGraphs(dependencyGraphFiles) {
144767+
if (dependencyGraphFiles.length === 0) {
144768+
core.info('No dependency graph files found to submit.');
144769+
return;
144770+
}
144764144771
if (isRunningInActEnvironment()) {
144765144772
core.info('Dependency graph submit not supported in the ACT environment.');
144766144773
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
@@ -144802,7 +144809,6 @@ async function submitDependencyGraphFile(jsonFile) {
144802144809
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
144803144810
}
144804144811
async function downloadDependencyGraphs() {
144805-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
144806144812
const findBy = github.context.payload.workflow_run
144807144813
? {
144808144814
token: (0, configuration_1.getGithubToken)(),
@@ -144812,27 +144818,29 @@ async function downloadDependencyGraphs() {
144812144818
}
144813144819
: undefined;
144814144820
const artifactClient = new artifact_1.DefaultArtifactClient();
144815-
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
144816144821
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144817144822
latest: true,
144818144823
findBy
144819-
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144824+
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144820144825
for (const artifact of dependencyGraphArtifacts) {
144821144826
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144822-
path: downloadPath,
144823144827
findBy
144824144828
});
144825144829
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144826144830
}
144827-
return findDependencyGraphFiles(downloadPath);
144831+
return findDependencyGraphFiles();
144828144832
}
144829-
async function findDependencyGraphFiles(dir) {
144830-
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
144833+
async function findDependencyGraphFiles() {
144834+
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144831144835
const allFiles = await globber.glob();
144832144836
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144833144837
unprocessedFiles.forEach(markProcessed);
144838+
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144834144839
return unprocessedFiles;
144835144840
}
144841+
function getReportDirectory() {
144842+
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
144843+
}
144836144844
function isProcessed(dependencyGraphFile) {
144837144845
const markerFile = `${dependencyGraphFile}.processed`;
144838144846
return fs_1.default.existsSync(markerFile);

dist/setup-gradle/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup-gradle/post/index.js

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141798,6 +141798,9 @@ class DependencyGraphConfig {
141798141798
getJobCorrelator() {
141799141799
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
141800141800
}
141801+
getReportDirectory() {
141802+
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
141803+
}
141801141804
static constructJobCorrelator(workflow, jobId, matrixJson) {
141802141805
const matrixString = this.describeMatrix(matrixJson);
141803141806
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;
@@ -142147,7 +142150,7 @@ async function setup(config) {
142147142150
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_REF', github.context.ref);
142148142151
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
142149142152
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', (0, configuration_1.getWorkspaceDirectory)());
142150-
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve((0, configuration_1.getWorkspaceDirectory)(), 'dependency-graph-reports'));
142153+
maybeExportVariable('DEPENDENCY_GRAPH_REPORT_DIR', config.getReportDirectory());
142151142154
if (option === configuration_1.DependencyGraphOption.Clear) {
142152142155
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', '');
142153142156
core.exportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', '');
@@ -142169,22 +142172,22 @@ async function complete(config) {
142169142172
return;
142170142173
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
142171142174
case configuration_1.DependencyGraphOption.Clear:
142172-
await submitDependencyGraphs(await findGeneratedDependencyGraphFiles());
142175+
await submitDependencyGraphs(await findDependencyGraphFiles());
142173142176
return;
142174142177
case configuration_1.DependencyGraphOption.GenerateAndUpload:
142175-
await uploadDependencyGraphs(await findGeneratedDependencyGraphFiles(), config);
142178+
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
142176142179
}
142177142180
}
142178142181
catch (e) {
142179142182
warnOrFail(config, option, e);
142180142183
}
142181142184
}
142182142185
exports.complete = complete;
142183-
async function findGeneratedDependencyGraphFiles() {
142184-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
142185-
return await findDependencyGraphFiles(workspaceDirectory);
142186-
}
142187142186
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
142187+
if (dependencyGraphFiles.length === 0) {
142188+
core.info('No dependency graph files found to upload.');
142189+
return;
142190+
}
142188142191
if (isRunningInActEnvironment()) {
142189142192
core.info('Dependency graph upload not supported in the ACT environment.');
142190142193
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
@@ -142214,6 +142217,10 @@ async function downloadAndSubmitDependencyGraphs(config) {
142214142217
}
142215142218
}
142216142219
async function submitDependencyGraphs(dependencyGraphFiles) {
142220+
if (dependencyGraphFiles.length === 0) {
142221+
core.info('No dependency graph files found to submit.');
142222+
return;
142223+
}
142217142224
if (isRunningInActEnvironment()) {
142218142225
core.info('Dependency graph submit not supported in the ACT environment.');
142219142226
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
@@ -142255,7 +142262,6 @@ async function submitDependencyGraphFile(jsonFile) {
142255142262
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
142256142263
}
142257142264
async function downloadDependencyGraphs() {
142258-
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
142259142265
const findBy = github.context.payload.workflow_run
142260142266
? {
142261142267
token: (0, configuration_1.getGithubToken)(),
@@ -142265,27 +142271,29 @@ async function downloadDependencyGraphs() {
142265142271
}
142266142272
: undefined;
142267142273
const artifactClient = new artifact_1.DefaultArtifactClient();
142268-
const downloadPath = path.resolve(workspaceDirectory, 'dependency-graph');
142269142274
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
142270142275
latest: true,
142271142276
findBy
142272-
})).artifacts.filter(candidate => candidate.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
142277+
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
142273142278
for (const artifact of dependencyGraphArtifacts) {
142274142279
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
142275-
path: downloadPath,
142276142280
findBy
142277142281
});
142278142282
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
142279142283
}
142280-
return findDependencyGraphFiles(downloadPath);
142284+
return findDependencyGraphFiles();
142281142285
}
142282-
async function findDependencyGraphFiles(dir) {
142283-
const globber = await glob.create(`${dir}/dependency-graph-reports/*.json`);
142286+
async function findDependencyGraphFiles() {
142287+
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
142284142288
const allFiles = await globber.glob();
142285142289
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
142286142290
unprocessedFiles.forEach(markProcessed);
142291+
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
142287142292
return unprocessedFiles;
142288142293
}
142294+
function getReportDirectory() {
142295+
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
142296+
}
142289142297
function isProcessed(dependencyGraphFile) {
142290142298
const markerFile = `${dependencyGraphFile}.processed`;
142291142299
return fs_1.default.existsSync(markerFile);

dist/setup-gradle/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wrapper-validation/main/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89925,6 +89925,9 @@ class DependencyGraphConfig {
8992589925
getJobCorrelator() {
8992689926
return DependencyGraphConfig.constructJobCorrelator(github.context.workflow, github.context.job, getJobMatrix());
8992789927
}
89928+
getReportDirectory() {
89929+
return path_1.default.resolve(getWorkspaceDirectory(), 'dependency-graph-reports');
89930+
}
8992889931
static constructJobCorrelator(workflow, jobId, matrixJson) {
8992989932
const matrixString = this.describeMatrix(matrixJson);
8993089933
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`;

dist/wrapper-validation/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)