feat: reset asset name to krieg temporarily

This commit is contained in:
TrèsAbhi committed 2024-04-20 12:02:33 -05:00
1 parent c2b936c925
commit 14cecdebe3
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import isDev from './isDev';
export function asset(path: string) {
return `https://raw.githubusercontent.com/tresabhi/blitzrinth-assets/${isDev() ? 'dev' : 'main'}/${path}`;
return `https://raw.githubusercontent.com/tresabhi/blitzkrieg-assets/${isDev() ? 'dev' : 'main'}/${path}`;
}
+1 -1
View File
@@ -12,7 +12,7 @@ export async function commitAssets(
await commitMultipleFiles(
'tresabhi',
'blitzrinth-assets',
'blitzkrieg-assets',
production ? 'main' : 'dev',
`${message} - ${new Date().toDateString()}`,
changes,
@@ -16,7 +16,7 @@ export async function getArchivedLatestSeasonNumber() {
if (ratingInfo.detail) {
const regionsURL = (
(await fetch(
'https://api.github.com/repos/tresabhi/blitzrinth-assets/git/trees/main',
'https://api.github.com/repos/tresabhi/blitzkrieg-assets/git/trees/main',
).then((response) => response.json())) as GitHubTrees
).tree.find(({ path }) => path === 'regions')!.url;
const comURL = (
+6 -6
View File
@@ -11,7 +11,7 @@ export class AssetCommit {
async add(path: string, content: string, encoding: 'utf-8' | 'base64') {
console.log(`Blob: adding ${path}...`);
const blob = await createBlob('tresabhi', 'blitzrinth-assets', {
const blob = await createBlob('tresabhi', 'blitzkrieg-assets', {
content,
encoding,
path,
@@ -26,14 +26,14 @@ export class AssetCommit {
const latestCommitSha = (
await octokit.git.getRef({
owner: 'tresabhi',
repo: 'blitzrinth-assets',
repo: 'blitzkrieg-assets',
ref: `heads/${this.production ? 'main' : 'dev'}`,
})
).data.object.sha;
const treeSha = (
await octokit.git.getCommit({
owner: 'tresabhi',
repo: 'blitzrinth-assets',
repo: 'blitzkrieg-assets',
commit_sha: latestCommitSha,
})
).data.tree.sha;
@@ -41,20 +41,20 @@ export class AssetCommit {
const { data: treeData } = await octokit.git.createTree({
owner: 'tresabhi',
repo: 'blitzrinth-assets',
repo: 'blitzkrieg-assets',
base_tree: treeSha,
tree: blobs,
});
const { data: newCommitData } = await octokit.git.createCommit({
owner: 'tresabhi',
repo: 'blitzrinth-assets',
repo: 'blitzkrieg-assets',
message: this.message,
tree: treeData.sha,
parents: [latestCommitSha],
});
await octokit.git.updateRef({
owner: 'tresabhi',
repo: 'blitzrinth-assets',
repo: 'blitzkrieg-assets',
ref: `heads/${this.production ? 'main' : 'dev'}`,
sha: newCommitData.sha,
});