Skip to content

Commit

Permalink
Adding branch info to the version check
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed Jun 24, 2024
1 parent 6dcaba6 commit d53de0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
labels: |
Last run number=${{ github.run_number }}
Last commit=${{ github.sha }}
Branch=${{ github.ref_name}}
build-args: |
LAST_RUN_NUMBER=${{ github.run_number }}
LAST_COMMIT=${{ github.sha }}
BRANCH=${{ github.ref_name}}
7 changes: 5 additions & 2 deletions sausage_bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ async def get_version(interaction: discord.Interaction):
await interaction.response.defer(ephemeral=True)
version_in = file_io.read_json(envs.version_file)
await interaction.followup.send(
'Last run number: {}\nLast commit: {}'.format(
version_in['LAST_RUN_NUMBER'], version_in['LAST_COMMIT']
'Running the `{}` branch:\nLast run number: {}\n'
'Last commit: {}'.format(
version_in['BRANCH'],
version_in['LAST_RUN_NUMBER'],
version_in['LAST_COMMIT']
),
ephemeral=True
)
Expand Down

0 comments on commit d53de0b

Please sign in to comment.