mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix build script outside of CI
This commit is contained in:
@@ -267,35 +267,37 @@ async function spawn(command, args, options, label) {
|
||||
return;
|
||||
}
|
||||
|
||||
let annotated;
|
||||
try {
|
||||
const { annotations } = parseAnnotations(stdoutBuffer);
|
||||
for (const annotation of annotations) {
|
||||
const content = formatAnnotationToHtml(annotation);
|
||||
if (isBuildkite()) {
|
||||
let annotated;
|
||||
try {
|
||||
const { annotations } = parseAnnotations(stdoutBuffer);
|
||||
for (const annotation of annotations) {
|
||||
const content = formatAnnotationToHtml(annotation);
|
||||
reportAnnotationToBuildKite({
|
||||
priority: 10,
|
||||
label: annotation.title || annotation.filename,
|
||||
content,
|
||||
});
|
||||
annotated = true;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Failed to parse annotations:`, error);
|
||||
}
|
||||
|
||||
if (!annotated) {
|
||||
const content = formatAnnotationToHtml({
|
||||
filename: relative(process.cwd(), import.meta.filename),
|
||||
title: "build failed",
|
||||
content: stdoutBuffer,
|
||||
source: "build",
|
||||
level: "error",
|
||||
});
|
||||
reportAnnotationToBuildKite({
|
||||
priority: 10,
|
||||
label: annotation.title || annotation.filename,
|
||||
label: "build failed",
|
||||
content,
|
||||
});
|
||||
annotated = true;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Failed to parse annotations:`, error);
|
||||
}
|
||||
|
||||
if (!annotated) {
|
||||
const content = formatAnnotationToHtml({
|
||||
filename: relative(process.cwd(), import.meta.filename),
|
||||
title: "build failed",
|
||||
content: stdoutBuffer,
|
||||
source: "build",
|
||||
level: "error",
|
||||
});
|
||||
reportAnnotationToBuildKite({
|
||||
priority: 10,
|
||||
label: "build failed",
|
||||
content,
|
||||
});
|
||||
}
|
||||
|
||||
if (signalCode) {
|
||||
|
||||
Reference in New Issue
Block a user