Skip to content

Commit 00673a3

Browse files
committed
cache clean
1 parent ca267ff commit 00673a3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"generate:rights": "node scripts/rights.js",
1414
"generate:schema": "node scripts/schema.js",
1515
"generate:client": "node scripts/client.js",
16-
"generate:changelog": "node scripts/changelog.js"
16+
"generate:changelog": "node scripts/changelog.js",
17+
"clean:cache": "rm -v assets/cache/*"
1718
},
1819
"main": "dist/bundle/index.js",
1920
"types": "src/bundle/index.ts",

scripts/changelog.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ const fetch = require("node-fetch");
22
const fs = require("fs/promises");
33
const path = require("path");
44

5+
// Currently we don't connect to the database in this script so configuration specifacation right now is done via env or .env file
6+
// env vars are prefixed with SLOWCORD to avoid conflicts
7+
require("dotenv").config({
8+
path: path.join(__dirname, "..", ".env"), // use .env in root directory
9+
});
10+
511
const CACHE_PATH = path.join(__dirname, "..", "assets", "cache");
612
const CHANGELOG_PATH = path.join(__dirname, "..", "assets", "changelog.txt");
7-
const BASE_URL = "https://discord.com";
13+
const BASE_URL = process.env.SLOWCORD_BASE_URL || "https://discord.com";
814

915
const CHANGELOG_SCRIPT = "9c4b2d313c6e1c864e89.js";
1016

0 commit comments

Comments
 (0)