Skip to content

Commit

Permalink
chore: add shell script for poetry plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkx committed Aug 28, 2024
1 parent 98ca488 commit d712433
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,36 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "poetry"

- name: Check poetry
run: |
poetry --version
poetry config --list
- name: Install dependencies
run: poetry install

- name: Build Sphinx
run: |
poetry run make doc
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./docs/_build/html/"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
poetry install
poetry self add poetry-version-plugin
./poetry_plugins.sh
- name: Configure poetry
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ RUN curl -sSL https://install.python-poetry.org | python3 -

ENV PATH /root/.local/bin:$PATH

COPY pyproject.toml* poetry.lock* ./
COPY pyproject.toml* poetry.lock* poetry_plugins.sh ./

# RUN poetry config virtualenvs.in-project true
RUN poetry install

RUN ./poetry_plugins.sh

COPY . .
9 changes: 9 additions & 0 deletions poetry_plugins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

plugins=(
"poetry-version-plugin"
)

for plugin in "${plugins[@]}"; do
poetry self add "$plugin"
done
7 changes: 7 additions & 0 deletions yaylib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
__author__ = "ekkx"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2023 ekkx"

# 1.0.0.dev1 Development release
# 1.0.0a1 Alpha Release
# 1.0.0b1 Beta Release
# 1.0.0rc1 Release Candidate
# 1.0.0 Final Release
# 1.0.0.post1 Post Release
__version__ = "1.5.0.dev4"

from .client import Client
Expand Down

0 comments on commit d712433

Please sign in to comment.