Skip to content

Commit

Permalink
change exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Feb 5, 2024
1 parent a4569ab commit dcb1cc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/octez_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: python3 octez_version.py

- name: Create a PR for new version
if: success()
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
8 changes: 3 additions & 5 deletions octez_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ def main():

if current_version == latest_version:
print('Octez version is up to date.')
exit(1)
exit(0)

if not env.get("GITHUB_ACTIONS"):
print("This script is intended to be run in a GitHub Action.")
exit(2)
exit(0)

print('Octez version has changed. Updating...')
Path('octez_version').write_text(latest_version)

run('make', 'build')
exit(0)
exit(1)

if __name__ == "__main__":
main()

0 comments on commit dcb1cc7

Please sign in to comment.