Fixed Commit errors
This commit is contained in:
parent
42f5f6baf3
commit
a36f23e6ae
@ -122,3 +122,4 @@ def generate_files(storage_dir, ctx, filename, game_ini, dinos_data, mods):
|
|||||||
os.mkdir(directory)
|
os.mkdir(directory)
|
||||||
generate_game_ini(game_ini, mods, directory)
|
generate_game_ini(game_ini, mods, directory)
|
||||||
generate_dino_files(dinos_data, directory)
|
generate_dino_files(dinos_data, directory)
|
||||||
|
return 1
|
||||||
|
|||||||
@ -49,9 +49,9 @@ class Uploader:
|
|||||||
game_ini, dinos_data, mods)
|
game_ini, dinos_data, mods)
|
||||||
await msg.edit(content='Processing... Files generated... Committing changes')
|
await msg.edit(content='Processing... Files generated... Committing changes')
|
||||||
await utils.git_add(self.bot.loop, storage_dir, '*')
|
await utils.git_add(self.bot.loop, storage_dir, '*')
|
||||||
await utils.git_commit(self.bot.loop,
|
if await utils.git_commit(self.bot.loop,
|
||||||
storage_dir,
|
storage_dir,
|
||||||
f'Uploaded {len(dinos_data)} dinos {official}')
|
f'"Uploaded {len(dinos_data)} dinos {official}"'):
|
||||||
await msg.edit(content='Processing... Committed... Pushing files to GitHub')
|
await msg.edit(content='Processing... Committed... Pushing files to GitHub')
|
||||||
push_status = await utils.git_push(self.bot.loop, storage_dir)
|
push_status = await utils.git_push(self.bot.loop, storage_dir)
|
||||||
if push_status == 'Completed':
|
if push_status == 'Completed':
|
||||||
@ -61,6 +61,9 @@ class Uploader:
|
|||||||
f'\n{push_status}')
|
f'\n{push_status}')
|
||||||
await msg.edit(content='There was an error pushing the files to GitHub\n'
|
await msg.edit(content='There was an error pushing the files to GitHub\n'
|
||||||
'Dusty.P has been notified and will get this fixed')
|
'Dusty.P has been notified and will get this fixed')
|
||||||
|
else:
|
||||||
|
await msg.edit(content='There was an error committing the files\n'
|
||||||
|
'Dusty.P has been notified and will get this fixed')
|
||||||
else:
|
else:
|
||||||
await self.bot.get_user(owner_id).send(f'There was an error with git pull\n'
|
await self.bot.get_user(owner_id).send(f'There was an error with git pull\n'
|
||||||
f'{pull_status}')
|
f'{pull_status}')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user