Skip to content

Commit

Permalink
add tool script
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed Jul 24, 2024
1 parent e71a52c commit 89cc518
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ export_presets.cfg
# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
mono_crash.*.json

# Python
__pycache__/
8 changes: 8 additions & 0 deletions tools/merge_and_push_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from utils import msg_system

error_msg = "Git is not installed"
msg_system("git checkout main", error_msg)
msg_system("git merge dev", error_msg)
msg_system("git push", error_msg)
msg_system("git checkout dev", error_msg)
input("ok")
7 changes: 7 additions & 0 deletions tools/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os


def msg_system(cmd, error_msg):
if os.system(cmd) != 0:
print(error_msg)
exit(1)

0 comments on commit 89cc518

Please sign in to comment.