This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2deed38
commit f691b12
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,15 @@ for (let set of eightyeightbythirtyones) { | |
let url = new URL(button.src); | ||
client | ||
.get( | ||
{ hostname: url.hostname, path: url.pathname + url.search, headers: { "User-Agent": "Mozilla/5.0" } }, | ||
{ | ||
hostname: url.hostname, | ||
path: url.pathname + url.search, | ||
headers: { | ||
"User-Agent": `tauon.dev-prebuild-fetcher/${ | ||
require("./package.json").version | ||
} node-http/${process.versions.node} <[email protected]>`, | ||
}, | ||
}, | ||
(res) => { | ||
let outfile = | ||
"src/static/images/88x31/3rdparty/" + | ||
|
@@ -68,3 +76,21 @@ let gd = new GD(); | |
} | ||
filesystem.writeFileSync("src/_data/gd.json", JSON.stringify(userinfo)); | ||
})(); | ||
|
||
const spawn = require("child_process").spawn; | ||
const proc = spawn("git", ["log", "-n", "1", '--pretty=format:"%h%n%s%n%ad"']); | ||
|
||
let output = ""; | ||
proc.stdout.on("data", (chunk) => { | ||
output += chunk.toString(); | ||
}); | ||
proc.on("exit", () => { | ||
let [hash, message, dateRaw] = output.slice(1, -1).split(/\r\n|\r|\n/g); | ||
let data = { | ||
hash, | ||
message, | ||
commitDate: new Date(dateRaw), | ||
buildDate: new Date(), | ||
}; | ||
filesystem.writeFileSync("src/_data/buildinfo.json", JSON.stringify(data)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters