From dab5e14297f21d687d26fba648264fb97957591b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:57:28 -0500 Subject: [PATCH 1/4] feat: move tank icons to the bottom --- scripts/buildAssets/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildAssets/index.ts b/scripts/buildAssets/index.ts index 387a93085..e8d91bdc3 100644 --- a/scripts/buildAssets/index.ts +++ b/scripts/buildAssets/index.ts @@ -41,9 +41,9 @@ const methods = [ consumableProvisionIcons, camouflageIcons, boosterIcons, - tankIcons, tankArmors, tankModels, + tankIcons, ]; for (const method of methods) { From 9d714715290423856e8ba19363f8f3e9841f9d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:03:08 -0500 Subject: [PATCH 2/4] feat: nice progress bar --- .github/workflows/cd-assets.yml | 2 +- package.json | 1 + src/core/blitzkit/commitMultipleFiles.ts | 12 +++--------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cd-assets.yml b/.github/workflows/cd-assets.yml index eb388c761..d981122f6 100644 --- a/.github/workflows/cd-assets.yml +++ b/.github/workflows/cd-assets.yml @@ -46,4 +46,4 @@ jobs: $env:DATABASE_URL = "${{ secrets.DATABASE_URL }}" $env:VIDEOS_SHEET = "${{ secrets.VIDEOS_SHEET }}" $env:GOOGLE_APPLICATION_CREDENTIALS = "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" - bun scripts/buildAssets/index.ts --all-targets --depot --production + bun build:assets --all-targets --depot --production diff --git a/package.json b/package.json index 4ff7cf7f0..bf47c72ba 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "src/server.ts", "type": "module", "scripts": { + "build:assets": "bun scripts/buildAssets/index.ts", "build:averages": "bun scripts/averages", "build:db": "prisma generate", "build:bot": "bun scripts/build.ts --production", diff --git a/src/core/blitzkit/commitMultipleFiles.ts b/src/core/blitzkit/commitMultipleFiles.ts index 1b49b615a..0b75f6cf8 100644 --- a/src/core/blitzkit/commitMultipleFiles.ts +++ b/src/core/blitzkit/commitMultipleFiles.ts @@ -1,3 +1,4 @@ +import ProgressBar from 'progress'; import { GithubChangeBlob, createBlob } from './createBlob'; import { octokit } from './octokit'; @@ -30,21 +31,14 @@ export default async function commitMultipleFiles( }) ).data.tree.sha; const blobs: GithubChangeBlob[] = []; + const bar = new ProgressBar('Blobs :bar', changes.length); for (const changeIndexString in changes) { const changeIndex = parseInt(changeIndexString); const change = changes[changeIndex]; const createdBlob = await createBlob(owner, repo, change); blobs.push(createdBlob!); - - if (verbose) { - console.log( - `Created blob ${changeIndex + 1} / ${changes.length} (${( - (100 * (changeIndex + 1)) / - changes.length - ).toFixed(2)}%)`, - ); - } + bar.tick(); } const { data: treeData } = await octokit.git.createTree({ From ea9d3685a1b7fc4bdba1bc1e56a6b98979fd30ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:07:33 -0500 Subject: [PATCH 3/4] Update cd-discover-ids.yml --- .github/workflows/cd-discover-ids.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-discover-ids.yml b/.github/workflows/cd-discover-ids.yml index 6cb5e86b5..3512851c9 100644 --- a/.github/workflows/cd-discover-ids.yml +++ b/.github/workflows/cd-discover-ids.yml @@ -5,7 +5,7 @@ on: branches: main workflow_dispatch: schedule: - - cron: '0 */6 * * *' + - cron: '0 0 * * 1' concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 31158b9d68e86a21d82dd8e21ead6c679a418ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:07:45 -0500 Subject: [PATCH 4/4] Update cd-discover-ids.yml --- .github/workflows/cd-discover-ids.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cd-discover-ids.yml b/.github/workflows/cd-discover-ids.yml index 3512851c9..5b224252f 100644 --- a/.github/workflows/cd-discover-ids.yml +++ b/.github/workflows/cd-discover-ids.yml @@ -1,8 +1,6 @@ name: CD Discover IDs on: - push: - branches: main workflow_dispatch: schedule: - cron: '0 0 * * 1'