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 RPM specification file #50

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,25 @@ jobs:
run: make install
- name: Check docs
run: make check-docs
check-version-accordance:
name: Check for version accordance
runs-on: ubuntu-latest
container: fedora:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install required packages
run: dnf makecache && dnf install -y make rpm-build python python-pip
- name: Install Poetry
run: pip install poetry
- name: Create virtual environment
run: make install
- name: Check versions (Python package and RPM specification)
shell: bash
run: |
PACKAGE_VERSION=$(poetry version --short)
RPM_VERSION=$(rpmspec -q --qf "%{version}" ci-scripts/linux/rpm/python3-nitrokey.spec)
if [ $PACKAGE_VERSION == $RPM_VERSION ]; then exit 0; else exit 1; fi
build-docs:
name: Build documentation
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- Remove `ecdsa` dependency
- Remove two step update handling on macOS
- Correct update message
- Add RPM specification file
- Add CI test to make sure versions in `pyproject.toml` and `python3-nitrokey.spec` are the same

[All Changes](https://github.com/Nitrokey/nitrokey-sdk-py/compare/v0.2.2...HEAD)

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FORMAT_DIRS := src stubs tests
LINT_DIRS := src tests
PACKAGE_VERSION:=$(shell poetry version --short)

.PHONY: install
install:
Expand Down Expand Up @@ -60,3 +61,7 @@ generate-api-docs:
.PHONY: build-docs
build-docs:
poetry run sphinx-build --fail-on-warning docs _build

.PHONY: update-version
update-version:
sed -i "/^Version:/s/[[:digit:]].*/$(PACKAGE_VERSION)/" ci-scripts/linux/rpm/python3-nitrokey.spec
Loading