Skip to content

Commit

Permalink
ci: renames on workflows for simplicity (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoclyps authored Nov 6, 2023
1 parent 1d4ab54 commit 323a9ba
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion .github/workflows/on-pr.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- "*"

jobs:

test:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Poetry Plugin: upgrade

![release](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/on-release.yml/badge.svg)
![publish](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/on-publish.yml/badge.svg)
![test](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/on-pr.yml/badge.svg)
![release](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/release.yml/badge.svg)
![publish](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/publish.yml/badge.svg)
![test](https://github.com/apoclyps/poetry-plugin-upgrade/actions/workflows/test.yml/badge.svg)
[![license](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
![python_version](https://img.shields.io/badge/Python-%3E=3.8-blue)
![poetry_version](https://img.shields.io/badge/Poetry-%3E=1.6-blue)
Expand Down
7 changes: 3 additions & 4 deletions src/poetry_plugin_upgrade/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,13 @@ def handle_version(current_version: str, candidate: Package) -> str:

if current_version.startswith(">="):
version_constraint = ">="
elif current_version[0] == ">":
version_constraint = ">"

if current_version.startswith("=="):
version_constraint = "=="

if current_version[0] == ">":
version_constraint = ">"

return f"{version_constraint}{candidate.pretty_version}"
return f"{version_constraint}{candidate.pretty_version}" if version_constraint else candidate.pretty_version

@staticmethod
def is_bumpable(
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_command_with_latest(
expected = PyProjectTOML(path).file.read()

assert app_tester.execute("upgrade --latest") == 0
assert dict(PyProjectTOML(tmp_pyproject_path).file.read()) == expected
assert PyProjectTOML(tmp_pyproject_path).file.read() == expected
command_call.assert_called_once_with(name="update")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ waldo = { git = "https://example.com/test/project.git" }
fred = "1.1.1"
plugh = "^2.2.2"
xyzzy = "~2.2.2"
nacho = "2.2.2"
nacho = "<1.1.1"
thud = ">2.2.2"

[tool.poetry.group.docs.dependencies]
foobar = "2.2.2"
foobar = "<=1.1.1"
foobaz = ">=2.2.2"
fooqux = "2.2.2"
fooquux = "2.2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ waldo = { git = "https://example.com/test/project.git" }
fred = "1.1.1"
plugh = "^2.2.2"
xyzzy = "~2.2.2"
nacho = "2.2.2"
nacho = "<1.1.1"
thud = ">2.2.2"

[tool.poetry.group.docs.dependencies]
foobar = "2.2.2"
foobar = "<=1.1.1"
foobaz = ">=2.2.2"
fooqux = "2.2.2"
fooquux = "*"
Expand Down

0 comments on commit 323a9ba

Please sign in to comment.