Skip to content

Commit

Permalink
refactor: rewrite all commands as tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Jan 10, 2025
1 parent 83d046b commit 58cc591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/sync_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

CMD_PULL = "git pull"
CMD_HEAD_HASH = "git rev-parse HEAD"
CMD_ADD = "git add . --all --force"
CMD_COMMIT = "git commit -m"
CMD_ADD = "git", "add", ".", "--all", "--force"
CMD_COMMIT = "git", "commit", "-m"
CMD_PUSH = "git", "push", "origin", "master", "--dry-run"

COMMIT_MSG_PREFIX = "doc build for commit"
Expand Down Expand Up @@ -78,7 +78,7 @@ def add_commit_push_github(msg: str, /) -> None:
os.chdir(DOC_REPO_DIR)
print("Pushing ...")
# NOTE: Ensures the message uses cross-platform escaping
cmd_commit = *CMD_COMMIT.split(" "), msg
cmd_commit = *CMD_COMMIT, msg
commands = (CMD_ADD, cmd_commit, CMD_PUSH)
for command in commands:
fs.run_stream_stdout(command)
Expand Down

0 comments on commit 58cc591

Please sign in to comment.