mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
16 lines
485 B
TypeScript
16 lines
485 B
TypeScript
import { assertSecret } from '@blitzkit/core';
|
|
import { commitMultipleFiles, FileChange } from './commitMultipleFiles';
|
|
|
|
export async function commitAssets(message: string, changes: FileChange[]) {
|
|
console.log(`Committing ${message}...`);
|
|
|
|
if (changes.length === 0) return;
|
|
|
|
await commitMultipleFiles(
|
|
assertSecret(import.meta.env.PUBLIC_ASSET_REPO),
|
|
assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
|
|
`${message} - ${new Date().toDateString()}`,
|
|
changes,
|
|
);
|
|
}
|