-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.ps1
26 lines (23 loc) · 1.06 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if (Test-Path ./docs) {
Remove-Item ./docs -Recurse
}
New-Item -ItemType Directory ./docs
New-Item -ItemType Directory ./docs/2018
New-Item -ItemType Directory ./docs/2019
New-Item -ItemType Directory ./docs/2020
New-Item -ItemType Directory ./docs/2021
New-Item -ItemType Directory ./docs/2022
New-Item -ItemType Directory ./docs/2023
New-Item -ItemType Directory ./docs/2024
Copy-Item ./src/*.* ./docs
Copy-Item ./2018/results-sanitized.json ./docs/2018/
Copy-Item ./2019/results-sanitized.json ./docs/2019/
Copy-Item ./2020/results-sanitized.json ./docs/2020/
Copy-Item ./2021/results-sanitized.json ./docs/2021/
Copy-Item ./2022/results-sanitized.json ./docs/2022/
Copy-Item ./2023/results-sanitized.json ./docs/2023/
Copy-Item ./2024/results-sanitized.json ./docs/2024/
# Hack needed because GitHub pages serves the site as a
# subfolder on my gh-pages domain:
(Get-Content ./docs/app.js).replace('const baseUrl = "";', 'const baseUrl = ".";') | Set-Content ./docs/app.js
(Get-Content ./docs/index.html).replace('?v1', '?v' + (New-Guid)) | Set-Content ./docs/index.html