Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job checking the version bump #482

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/python-client.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Python client checks, package build and deployment

on:
Expand Down Expand Up @@ -35,6 +36,50 @@ jobs:
- name: Mypy type checking
run: (cd client && mypy src/)

get-develop-version:
name: Get develop version
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'develop' }}
outputs:
develop_version: ${{ steps.get-version.outputs.develop_version }}
steps:
- name: Check Out Code
uses: actions/checkout@v3
with:
ref: develop
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12.0
- name: Get version
id: get-version
env:
PYTHONPATH: client/src/ledger_app_clients
run: |
echo "develop_version=$(python -c 'from ethereum import __version__; print(__version__)')" >> $GITHUB_OUTPUT

version-check:
name: Check Version when opening a PR against develop
runs-on: ubuntu-latest
needs: get-develop-version
steps:
- name: Check Out Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12.0
- name: Check Version Bump
env:
DEVELOP_VERSION: ${{needs.get-develop-version.outputs.develop_version}}
PYTHONPATH: client/src/ledger_app_clients
run: |
current_version=$(python -c "from ethereum import __version__; print(__version__)")
if [[ "$current_version" == "$DEVELOP_VERSION" ]]; then
echo "Version in __init__.py hasn't been bumped. Please bump the version before merging."
exit 1
fi

packaging:
needs: [lint, mypy]
name: Build, test and deploy the Python package
Expand Down
6 changes: 6 additions & 0 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2023-30-10

### Added

- Update the ragger app client to support "set external plugin" APDU

## [0.0.1] - 2023-08-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion client/src/ledger_app_clients/ethereum/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.1.0"