mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: commit concurrency
This commit is contained in:
1 parent
b243b12d1c
commit
3617e11792
11 files changed
+19
-25
No files matched your search
@@ -4,7 +4,7 @@ import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
|||||||
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
|
|
||||||
export async function circleFlags(production: boolean) {
|
export async function buildCircleFlags(production: boolean) {
|
||||||
const flags = await readdir(`${DATA}/${POI.flags}`);
|
const flags = await readdir(`${DATA}/${POI.flags}`);
|
||||||
const changes = await Promise.all(
|
const changes = await Promise.all(
|
||||||
flags
|
flags
|
||||||
@@ -25,5 +25,5 @@ export async function circleFlags(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('circle flags', changes, production);
|
await commitAssets('circle flags', changes, production);
|
||||||
}
|
}
|
||||||
@@ -89,5 +89,5 @@ export async function buildConsumableIcons(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('consumable icons', changes, production);
|
await commitAssets('consumable icons', changes, production);
|
||||||
}
|
}
|
||||||
@@ -675,7 +675,7 @@ export async function buildDefinitions(production: boolean) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
commitAssets(
|
await commitAssets(
|
||||||
'definitions',
|
'definitions',
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,5 +88,5 @@ export async function equipmentIcons(production: boolean) {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('equipment icons', changes, production);
|
await commitAssets('equipment icons', changes, production);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { config } from 'dotenv';
|
import { config } from 'dotenv';
|
||||||
import { argv } from 'process';
|
import { argv } from 'process';
|
||||||
import { circleFlags } from './circleFlags';
|
import { buildCircleFlags } from './circleFlags';
|
||||||
import { buildConsumableIcons } from './consumableIcons';
|
import { buildConsumableIcons } from './consumableIcons';
|
||||||
import { buildDefinitions } from './definitions';
|
import { buildDefinitions } from './definitions';
|
||||||
import { equipmentIcons } from './equipmentIcons';
|
import { equipmentIcons } from './equipmentIcons';
|
||||||
@@ -26,38 +26,37 @@ if (allTargets || targets?.includes('tankModels')) {
|
|||||||
await buildTankModels(production);
|
await buildTankModels(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
// no need to await the rest... I have enough ram
|
|
||||||
if (allTargets || targets?.includes('tankArmor')) {
|
if (allTargets || targets?.includes('tankArmor')) {
|
||||||
buildTankArmors(production);
|
await buildTankArmors(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('definitions')) {
|
if (allTargets || targets?.includes('definitions')) {
|
||||||
buildDefinitions(production);
|
await buildDefinitions(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('tankIcons')) {
|
if (allTargets || targets?.includes('tankIcons')) {
|
||||||
buildTankIcons(production);
|
await buildTankIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('scratchedFlags')) {
|
if (allTargets || targets?.includes('scratchedFlags')) {
|
||||||
buildScratchedFlags(production);
|
await buildScratchedFlags(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('circleFlags')) {
|
if (allTargets || targets?.includes('circleFlags')) {
|
||||||
circleFlags(production);
|
await buildCircleFlags(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('shellIcons')) {
|
if (allTargets || targets?.includes('shellIcons')) {
|
||||||
buildShellIcons(production);
|
await buildShellIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('moduleIcons')) {
|
if (allTargets || targets?.includes('moduleIcons')) {
|
||||||
buildModuleIcons(production);
|
await buildModuleIcons(production);
|
||||||
}
|
}
|
||||||
if (allTargets || targets?.includes('equipmentIcons')) {
|
if (allTargets || targets?.includes('equipmentIcons')) {
|
||||||
equipmentIcons(production);
|
equipmentIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('consumableIcons')) {
|
if (allTargets || targets?.includes('consumableIcons')) {
|
||||||
buildConsumableIcons(production);
|
await buildConsumableIcons(production);
|
||||||
}
|
}
|
||||||
@@ -28,5 +28,5 @@ export async function buildModuleIcons(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('module icons', changes, production);
|
await commitAssets('module icons', changes, production);
|
||||||
}
|
}
|
||||||
@@ -27,5 +27,5 @@ export async function buildScratchedFlags(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('scratched flags', changes, production);
|
await commitAssets('scratched flags', changes, production);
|
||||||
}
|
}
|
||||||
@@ -45,5 +45,5 @@ export async function buildShellIcons(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('shell icons', changes, production);
|
await commitAssets('shell icons', changes, production);
|
||||||
}
|
}
|
||||||
@@ -45,5 +45,5 @@ export async function buildTankArmors(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('tank armor', changes, production);
|
await commitAssets('tank armor', changes, production);
|
||||||
}
|
}
|
||||||
@@ -65,5 +65,5 @@ export async function buildTankIcons(production: boolean) {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
commitAssets('tank icons', changes, production);
|
await commitAssets('tank icons', changes, production);
|
||||||
}
|
}
|
||||||
@@ -26,11 +26,6 @@ export async function buildTankModels(production: boolean) {
|
|||||||
for (const nationIndex in nations) {
|
for (const nationIndex in nations) {
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
const nation = nations[nationIndex];
|
const nation = nations[nationIndex];
|
||||||
|
|
||||||
if (['china', 'european', 'france', 'germany', 'japan'].includes(nation)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||||
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user