Skip to content

Commit 4c76d7f

Browse files
authored
Make sure broken build breaks the presubmits (#165)
* break build * break build * error out on build properly * fix build * fix build * break build * break build * fix build * change npm run build
1 parent 9473007 commit 4c76d7f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/@apphosting/adapter-angular/src/simple-server/bundled_server.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44633,8 +44633,9 @@ var express = express$1;
4463344633
const app = express();
4463444634
const __filename = fileURLToPath(import.meta.url);
4463544635
const __dirname = path$2.dirname(__filename);
44636+
const oneYear = 31_536_000_000;
4463644637

44637-
app.use(express.static(path$2.join(__dirname, "..", "browser")));
44638+
app.use(express.static(path$2.join(__dirname, "..", "browser"), { maxAge: oneYear }));
4463844639
app.get("*", function (request, response) {
4463944640
response.sendFile(path$2.join(__dirname, "..", "browser", "index.html"));
4464044641
});

packages/@apphosting/adapter-angular/src/simple-server/server.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// *** IMPORTANT NOTE ***
2+
// make sure to run "npm run build" after making any changes to this file
3+
// changes to this file will not be reflected unless that command is run
14
import express from "express";
25
import path from "path";
36
import { fileURLToPath } from "url";

scripts/build.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
const { spawn } = require("child_process");
33
const { lernaScopeArgs } = require("./github.js");
44

5-
spawn("lerna", ["run", "build", ...lernaScopeArgs], { stdio: "inherit" });
5+
const buildProcess = spawn("lerna", ["run", "build", ...lernaScopeArgs], { stdio: "inherit" });
6+
7+
buildProcess.on("close", (code) => {
8+
process.exit(code);
9+
});

0 commit comments

Comments
 (0)