mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: enable commiting
This commit is contained in:
1 parent
553c9d552b
commit
9fbdaaf87f
5 files changed
+51
-53
No files matched your search
@@ -13,7 +13,9 @@ namespace BlitzKit.CLI.Models
|
||||
|
||||
public static async Task CommitAssets(string message, List<FileChange> changes)
|
||||
{
|
||||
Console.WriteLine($"Committing \"{message}\"... with {changes.Count} proposed changes");
|
||||
Console.WriteLine(
|
||||
$"Committing \"{message}\"... with {changes.Count} proposed changes to the \"{Env.GetString("PUBLIC_ASSET_BRANCH")}\" branch"
|
||||
);
|
||||
|
||||
if (changes.Count == 0)
|
||||
return;
|
||||
@@ -62,11 +64,7 @@ namespace BlitzKit.CLI.Models
|
||||
{
|
||||
var bytes = await response.Content.ReadAsByteArrayAsync();
|
||||
|
||||
// we discard blob if they're the same size; it's unlikely their
|
||||
// contents will be different; I love playing russian roulette!
|
||||
var equal =
|
||||
bytes.Length == change.Content.Count || bytes.SequenceEqual([.. change.Content]);
|
||||
if (!equal)
|
||||
if (!bytes.SequenceEqual([.. change.Content]))
|
||||
{
|
||||
var diff = change.Content.Count - bytes.Length;
|
||||
|
||||
|
||||
Reference in new issue
Block a user