Skip to content

Commit

Permalink
Update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Feb 24, 2025
1 parent 23aab36 commit 8cb79f9
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
run: python -m pip install poetry

- name: Install dependencies
run: poetry install --extras "unstable"
run: poetry install --with unstable

- name: Build package
run: poetry build
Expand All @@ -133,6 +133,6 @@ jobs:
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
skip-existing: true
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: python -m pip install poetry

- name: Install dependencies
run: poetry install --with test --extras "unstable"
run: poetry install --with test,unstable

- name: Build package
run: poetry build
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Publish to Test PyPI
if: ${{ github.event_name == 'push' }}
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USE_DOCKER ?=

prepare_docs:
@echo "Preparing documentation."
poetry install --with docs --extras "unstable"
poetry install --with docs,unstable
poetry run python $(DOCS_SRC_DIR)/generate_documentation.py
mkdir -p $(DOCS_DIST_DIR)/logos
mkdir -p $(DOCS_DIST_DIR)/img
Expand Down
9 changes: 0 additions & 9 deletions documentation/mkdocs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ poetry bundle venv /destination/path/
This is a bit more convoluted and it is similar to how you would install `misp-modules` on an offline instance.

Just follow those instructions but replace the package `misp-modules` with `-r requirements.txt`.

Before doing so you need to generate the `requirements.txt` file. Due to the fact we are still supporting Python 3.8 and that Poetry still has some limitations (soon to be resolved) you need to need to replace the line `python = ">=3.8.*,<3.13"` inside `pyproject.toml` with your exact version (just run `python --version`).

The following `sed` command does everything for you.

~~~~bash
sed -i "s/^python = .*/python = \"$(python -c 'import platform; print(platform.python_version())')\"/" pyproject.toml
~~~~

Then, run the following commands to generate your very own `requirements.txt`.

~~~~bash
Expand Down
Loading

0 comments on commit 8cb79f9

Please sign in to comment.