Skip to content

Commit

Permalink
Add version command (#8)
Browse files Browse the repository at this point in the history
* Add version command

* Run version command in sanity check
  • Loading branch information
ben-z authored Oct 7, 2024
1 parent 7b352c2 commit f32b8c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- name: Run sanity check
run: |
gatrace --help
gatrace version
publish:
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions src/github_actions_tracing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@

from vendor.generated import perfetto_trace_pb2

from ._version import __version__

@app.command()
def version():
"""
Print the version of the tool.
"""
return f"GitHub Actions Tracing version {__version__}"


def generate_uuid(workflow_run_id, attempt_number=-1, job_id=-1, step_id=-1):
"""
Expand Down

0 comments on commit f32b8c7

Please sign in to comment.