Skip to content

Commit

Permalink
ci(GITHUB): compatibility with new poetry version
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Jan 5, 2025
1 parent 9224794 commit 15178ad
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
- name: ${{ inputs.PRECOMMIT_HOOK_NAME }} -- (Template) Install pre-commit
run: |
bash "./.cicd-tools/boxes/active/${{ inputs.REMOTE_SCRIPT_USE_POETRY }}" \
"install-project"
"install-dependencies"
shell: bash
working-directory: template

Expand Down
Binary file modified cicd-tools/boxes/0.1.0.tar.gz
Binary file not shown.
10 changes: 8 additions & 2 deletions cicd-tools/boxes/0.1.0/ci/generic/scripts/use-poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,18 @@ _use_poetry_check-version() {
log "INFO" "POETRY > 'pyproject.toml' version matches '${1}'."
}

_use_poetry_install-dependencies() {
log "DEBUG" "POETRY > Installing project dependencies."
poetry install --verbose --no-root
}

_use_poetry_install-poetry() {
log "DEBUG" "POETRY > Installing poetry."
python -m pip install poetry --verbose
}

_use_poetry_install-project() {
log "DEBUG" "POETRY > Installing project requirements."
log "DEBUG" "POETRY > Installing project."
poetry install --verbose
}

Expand All @@ -52,8 +57,9 @@ _use_poetry_usage() {
log "ERROR" "USAGE: poetry.sh [COMMAND]"
log "ERROR" " COMMANDS:"
log "ERROR" " check-version [VERSION] - Compare the given semantic version to the 'pyproject.toml' file."
log "ERROR" " install-dependencies - Install the 'pyproject.toml' dependencies."
log "ERROR" " install-poetry - Install poetry."
log "ERROR" " install-project - Install the 'pyproject.toml' file with poetry."
log "ERROR" " install-project - Install the project and 'pyproject.toml' dependencies."
exit 127
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ runs:
- name: Dependencies (Python) -- Install Project Dependencies
run: |
bash "./.cicd-tools/boxes/active/${{ inputs.REMOTE_SCRIPT_USE_POETRY }}" \
"install-project"
"install-dependencies"
shell: bash
working-directory: ${{ inputs.PROJECT_ROOT_PATH }}
2 changes: 1 addition & 1 deletion hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ initialize_git() {
initialize_poetry() {

if [[ "${TEMPLATE_SKIP_POETRY}" != "1" ]]; then
poetry install --verbose
poetry install --verbose --no-root
fi

}
Expand Down
3 changes: 3 additions & 0 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# {{cookiecutter.project_slug}}

A placeholder for the templated project's markdown.

0 comments on commit 15178ad

Please sign in to comment.