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