Skip to content

Commit d9c87d4

Browse files
bigdazgithub-actions[bot]
authored andcommitted
[bot] Update dist directory
1 parent ff865cb commit d9c87d4

File tree

6 files changed

+213
-165
lines changed

6 files changed

+213
-165
lines changed

dist/dependency-submission/main/index.js

Lines changed: 70 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -144724,25 +144724,88 @@ async function complete(config) {
144724144724
return;
144725144725
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
144726144726
case configuration_1.DependencyGraphOption.Clear:
144727-
await submitDependencyGraphs(await findDependencyGraphFiles());
144727+
await findAndSubmitDependencyGraphs(config);
144728144728
return;
144729144729
case configuration_1.DependencyGraphOption.GenerateAndUpload:
144730-
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144730+
await findAndUploadDependencyGraphs(config);
144731144731
}
144732144732
}
144733144733
catch (e) {
144734144734
warnOrFail(config, option, e);
144735144735
}
144736144736
}
144737144737
exports.complete = complete;
144738-
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144739-
if (dependencyGraphFiles.length === 0) {
144740-
core.info('No dependency graph files found to upload.');
144738+
async function downloadAndSubmitDependencyGraphs(config) {
144739+
if (isRunningInActEnvironment()) {
144740+
core.info('Dependency graph not supported in the ACT environment.');
144741+
return;
144742+
}
144743+
try {
144744+
await submitDependencyGraphs(await downloadDependencyGraphs());
144745+
}
144746+
catch (e) {
144747+
warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
144748+
}
144749+
}
144750+
async function findAndSubmitDependencyGraphs(config) {
144751+
if (isRunningInActEnvironment()) {
144752+
core.info('Dependency graph not supported in the ACT environment.');
144741144753
return;
144742144754
}
144755+
const dependencyGraphFiles = await findDependencyGraphFiles();
144756+
try {
144757+
await submitDependencyGraphs(dependencyGraphFiles);
144758+
}
144759+
catch (e) {
144760+
try {
144761+
await uploadDependencyGraphs(dependencyGraphFiles, config);
144762+
}
144763+
catch (uploadError) {
144764+
core.info(String(uploadError));
144765+
}
144766+
throw e;
144767+
}
144768+
}
144769+
async function findAndUploadDependencyGraphs(config) {
144743144770
if (isRunningInActEnvironment()) {
144744-
core.info('Dependency graph upload not supported in the ACT environment.');
144745-
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
144771+
core.info('Dependency graph not supported in the ACT environment.');
144772+
return;
144773+
}
144774+
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144775+
}
144776+
async function downloadDependencyGraphs() {
144777+
const findBy = github.context.payload.workflow_run
144778+
? {
144779+
token: (0, configuration_1.getGithubToken)(),
144780+
workflowRunId: github.context.payload.workflow_run.id,
144781+
repositoryName: github.context.repo.repo,
144782+
repositoryOwner: github.context.repo.owner
144783+
}
144784+
: undefined;
144785+
const artifactClient = new artifact_1.DefaultArtifactClient();
144786+
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144787+
latest: true,
144788+
findBy
144789+
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144790+
for (const artifact of dependencyGraphArtifacts) {
144791+
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144792+
findBy
144793+
});
144794+
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144795+
}
144796+
return findDependencyGraphFiles();
144797+
}
144798+
async function findDependencyGraphFiles() {
144799+
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144800+
const allFiles = await globber.glob();
144801+
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144802+
unprocessedFiles.forEach(markProcessed);
144803+
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144804+
return unprocessedFiles;
144805+
}
144806+
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144807+
if (dependencyGraphFiles.length === 0) {
144808+
core.info('No dependency graph files found to upload.');
144746144809
return;
144747144810
}
144748144811
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
@@ -144756,28 +144819,11 @@ async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144756144819
});
144757144820
}
144758144821
}
144759-
async function downloadAndSubmitDependencyGraphs(config) {
144760-
if (isRunningInActEnvironment()) {
144761-
core.info('Dependency graph download and submit not supported in the ACT environment.');
144762-
return;
144763-
}
144764-
try {
144765-
await submitDependencyGraphs(await downloadDependencyGraphs());
144766-
}
144767-
catch (e) {
144768-
warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
144769-
}
144770-
}
144771144822
async function submitDependencyGraphs(dependencyGraphFiles) {
144772144823
if (dependencyGraphFiles.length === 0) {
144773144824
core.info('No dependency graph files found to submit.');
144774144825
return;
144775144826
}
144776-
if (isRunningInActEnvironment()) {
144777-
core.info('Dependency graph submit not supported in the ACT environment.');
144778-
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
144779-
return;
144780-
}
144781144827
for (const dependencyGraphFile of dependencyGraphFiles) {
144782144828
try {
144783144829
await submitDependencyGraphFile(dependencyGraphFile);
@@ -144811,36 +144857,6 @@ async function submitDependencyGraphFile(jsonFile) {
144811144857
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
144812144858
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
144813144859
}
144814-
async function downloadDependencyGraphs() {
144815-
const findBy = github.context.payload.workflow_run
144816-
? {
144817-
token: (0, configuration_1.getGithubToken)(),
144818-
workflowRunId: github.context.payload.workflow_run.id,
144819-
repositoryName: github.context.repo.repo,
144820-
repositoryOwner: github.context.repo.owner
144821-
}
144822-
: undefined;
144823-
const artifactClient = new artifact_1.DefaultArtifactClient();
144824-
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144825-
latest: true,
144826-
findBy
144827-
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144828-
for (const artifact of dependencyGraphArtifacts) {
144829-
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144830-
findBy
144831-
});
144832-
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144833-
}
144834-
return findDependencyGraphFiles();
144835-
}
144836-
async function findDependencyGraphFiles() {
144837-
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144838-
const allFiles = await globber.glob();
144839-
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144840-
unprocessedFiles.forEach(markProcessed);
144841-
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144842-
return unprocessedFiles;
144843-
}
144844144860
function getReportDirectory() {
144845144861
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
144846144862
}

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/setup-gradle/main/index.js

Lines changed: 70 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -144724,25 +144724,88 @@ async function complete(config) {
144724144724
return;
144725144725
case configuration_1.DependencyGraphOption.GenerateAndSubmit:
144726144726
case configuration_1.DependencyGraphOption.Clear:
144727-
await submitDependencyGraphs(await findDependencyGraphFiles());
144727+
await findAndSubmitDependencyGraphs(config);
144728144728
return;
144729144729
case configuration_1.DependencyGraphOption.GenerateAndUpload:
144730-
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144730+
await findAndUploadDependencyGraphs(config);
144731144731
}
144732144732
}
144733144733
catch (e) {
144734144734
warnOrFail(config, option, e);
144735144735
}
144736144736
}
144737144737
exports.complete = complete;
144738-
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144739-
if (dependencyGraphFiles.length === 0) {
144740-
core.info('No dependency graph files found to upload.');
144738+
async function downloadAndSubmitDependencyGraphs(config) {
144739+
if (isRunningInActEnvironment()) {
144740+
core.info('Dependency graph not supported in the ACT environment.');
144741+
return;
144742+
}
144743+
try {
144744+
await submitDependencyGraphs(await downloadDependencyGraphs());
144745+
}
144746+
catch (e) {
144747+
warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
144748+
}
144749+
}
144750+
async function findAndSubmitDependencyGraphs(config) {
144751+
if (isRunningInActEnvironment()) {
144752+
core.info('Dependency graph not supported in the ACT environment.');
144741144753
return;
144742144754
}
144755+
const dependencyGraphFiles = await findDependencyGraphFiles();
144756+
try {
144757+
await submitDependencyGraphs(dependencyGraphFiles);
144758+
}
144759+
catch (e) {
144760+
try {
144761+
await uploadDependencyGraphs(dependencyGraphFiles, config);
144762+
}
144763+
catch (uploadError) {
144764+
core.info(String(uploadError));
144765+
}
144766+
throw e;
144767+
}
144768+
}
144769+
async function findAndUploadDependencyGraphs(config) {
144743144770
if (isRunningInActEnvironment()) {
144744-
core.info('Dependency graph upload not supported in the ACT environment.');
144745-
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
144771+
core.info('Dependency graph not supported in the ACT environment.');
144772+
return;
144773+
}
144774+
await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
144775+
}
144776+
async function downloadDependencyGraphs() {
144777+
const findBy = github.context.payload.workflow_run
144778+
? {
144779+
token: (0, configuration_1.getGithubToken)(),
144780+
workflowRunId: github.context.payload.workflow_run.id,
144781+
repositoryName: github.context.repo.repo,
144782+
repositoryOwner: github.context.repo.owner
144783+
}
144784+
: undefined;
144785+
const artifactClient = new artifact_1.DefaultArtifactClient();
144786+
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144787+
latest: true,
144788+
findBy
144789+
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144790+
for (const artifact of dependencyGraphArtifacts) {
144791+
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144792+
findBy
144793+
});
144794+
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144795+
}
144796+
return findDependencyGraphFiles();
144797+
}
144798+
async function findDependencyGraphFiles() {
144799+
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144800+
const allFiles = await globber.glob();
144801+
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144802+
unprocessedFiles.forEach(markProcessed);
144803+
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144804+
return unprocessedFiles;
144805+
}
144806+
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144807+
if (dependencyGraphFiles.length === 0) {
144808+
core.info('No dependency graph files found to upload.');
144746144809
return;
144747144810
}
144748144811
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
@@ -144756,28 +144819,11 @@ async function uploadDependencyGraphs(dependencyGraphFiles, config) {
144756144819
});
144757144820
}
144758144821
}
144759-
async function downloadAndSubmitDependencyGraphs(config) {
144760-
if (isRunningInActEnvironment()) {
144761-
core.info('Dependency graph download and submit not supported in the ACT environment.');
144762-
return;
144763-
}
144764-
try {
144765-
await submitDependencyGraphs(await downloadDependencyGraphs());
144766-
}
144767-
catch (e) {
144768-
warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
144769-
}
144770-
}
144771144822
async function submitDependencyGraphs(dependencyGraphFiles) {
144772144823
if (dependencyGraphFiles.length === 0) {
144773144824
core.info('No dependency graph files found to submit.');
144774144825
return;
144775144826
}
144776-
if (isRunningInActEnvironment()) {
144777-
core.info('Dependency graph submit not supported in the ACT environment.');
144778-
core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
144779-
return;
144780-
}
144781144827
for (const dependencyGraphFile of dependencyGraphFiles) {
144782144828
try {
144783144829
await submitDependencyGraphFile(dependencyGraphFile);
@@ -144811,36 +144857,6 @@ async function submitDependencyGraphFile(jsonFile) {
144811144857
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
144812144858
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
144813144859
}
144814-
async function downloadDependencyGraphs() {
144815-
const findBy = github.context.payload.workflow_run
144816-
? {
144817-
token: (0, configuration_1.getGithubToken)(),
144818-
workflowRunId: github.context.payload.workflow_run.id,
144819-
repositoryName: github.context.repo.repo,
144820-
repositoryOwner: github.context.repo.owner
144821-
}
144822-
: undefined;
144823-
const artifactClient = new artifact_1.DefaultArtifactClient();
144824-
const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
144825-
latest: true,
144826-
findBy
144827-
})).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
144828-
for (const artifact of dependencyGraphArtifacts) {
144829-
const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
144830-
findBy
144831-
});
144832-
core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
144833-
}
144834-
return findDependencyGraphFiles();
144835-
}
144836-
async function findDependencyGraphFiles() {
144837-
const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
144838-
const allFiles = await globber.glob();
144839-
const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
144840-
unprocessedFiles.forEach(markProcessed);
144841-
core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
144842-
return unprocessedFiles;
144843-
}
144844144860
function getReportDirectory() {
144845144861
return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
144846144862
}

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.

0 commit comments

Comments
 (0)