Skip to content

Commit

Permalink
Specify branch for hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Aug 24, 2024
1 parent 0a91e41 commit 993cb08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pre-commit/soroban_versioning_pre_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
if PROJECT_KEY is None:
raise ValueError("'TANSU_PROJECT_KEY' is missing from the environment")

BRANCH = os.getenv("TANSU_BRANCH", "main")


def main():
project_key = bytes.fromhex(PROJECT_KEY)
Expand All @@ -31,7 +33,7 @@ def main():
.stdout.decode()
.strip("\n")
)
if branch != "main":
if branch != BRANCH:
exit(0)

commit_hash = (
Expand Down

0 comments on commit 993cb08

Please sign in to comment.