summaryrefslogtreecommitdiff
path: root/build.js
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-06-21 00:01:03 +0200
committerRaindropsSys <raindrops@equestria.dev>2024-06-21 00:01:03 +0200
commit597ed292210acc785f2bec4438488cc29c304ee9 (patch)
treefb51de07198779d7c1c7c0ee7448f4206605c36c /build.js
parenta069890e824f2f9b285d27de3149be0068b5eb10 (diff)
downloadstarshine-597ed292210acc785f2bec4438488cc29c304ee9.tar.gz
starshine-597ed292210acc785f2bec4438488cc29c304ee9.tar.bz2
starshine-597ed292210acc785f2bec4438488cc29c304ee9.zip
Make it work with GitHub
Diffstat (limited to 'build.js')
-rwxr-xr-xbuild.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/build.js b/build.js
index 1b66ca5..ff8397b 100755
--- a/build.js
+++ b/build.js
@@ -4,8 +4,8 @@ const path = require('path');
const port = ("42" + Math.random().toString().split(".")[1]).substring(0, 5);
-//console.log("Refreshing projects...");
-//.execSync("php refresh-projects.php", { stdio: "inherit", cwd: "includes" });
+console.log("Refreshing projects...");
+cp.execSync("php refresh-projects.php", { stdio: "inherit", cwd: "includes" });
console.log("Backing up .vercel...");
cp.execSync("mv ./out/.vercel ./.vercel");
@@ -55,6 +55,15 @@ let config = {
]
},
{
+ source: "/security.txt",
+ headers: [
+ {
+ key: "Content-Type",
+ value: "text/plain"
+ }
+ ]
+ },
+ {
source: "/announcement",
headers: [
{
@@ -182,6 +191,12 @@ let waiter = setInterval(async () => {
fs.writeFileSync("./out/version", fs.readFileSync("./version"));
fs.writeFileSync("./out/pubkey", fs.readFileSync("./pubkey"));
fs.writeFileSync("./out/announcement", fs.readFileSync("./announcement"));
+ fs.writeFileSync("./out/security.txt", fs.readFileSync("./security.txt"));
+
+ config['rewrites'].push({
+ source: "/.well-known/security.txt",
+ destination: "/security.txt"
+ });
fs.writeFileSync("./out/vercel.json", JSON.stringify(config, null, 2));
process.stdout.clearLine(null);