Skip to content

Commit ce8ffe8

Browse files
committed
Apply plugin template
1 parent 671f04d commit ce8ffe8

File tree

7 files changed

+19
-43
lines changed

7 files changed

+19
-43
lines changed

.ci/scripts/check_release.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ def template_config():
3737
def current_version(repo, commitish):
3838
try:
3939
pyproject_toml = tomllib.loads(repo.git.show(f"{commitish}:pyproject.toml"))
40-
current_version = pyproject_toml["project"]["version"]
40+
try:
41+
current_version = pyproject_toml["project"]["version"]
42+
except Exception:
43+
current_version = pyproject_toml["tool"]["bumpversion"]["current_version"]
4144
except Exception:
4245
current_version = repo.git.grep(
4346
"current_version", commitish, "--", ".bumpversion.cfg"

.ci/scripts/check_requirements.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def main():
6262
else:
6363
if check_prereleases and req.specifier.prereleases:
6464
# Do not even think about begging for more exceptions!
65-
if req.name != "pulp-python-client":
65+
if (
66+
not req.name.startswith("opentelemetry")
67+
and req.name != "pulp-python-client"
68+
):
6669
errors.append(f"{filename}:{nr}: Prerelease versions found in {line}.")
6770
ops = [spec.operator for spec in req.specifier]
6871
if "~=" in ops:

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-399-g78ad960
1+
2021.08.26-403-g76d04d7

.github/workflows/scripts/before_install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fi
3030
COMMIT_MSG=$(git log --format=%B --no-merges -1)
3131
export COMMIT_MSG
3232

33-
COMPONENT_VERSION=$(sed -ne "s/\s*version.*=.*['\"]\(.*\)['\"][\s,]*/\1/p" setup.py)
33+
COMPONENT_VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
3434

3535
mkdir .ci/ansible/vars || true
3636
echo "---" > .ci/ansible/vars/main.yaml
@@ -61,10 +61,10 @@ then
6161
fi
6262

6363
if [[ "$TEST" = "pulp" ]]; then
64-
python3 .ci/scripts/calc_constraints.py -u requirements.txt > upperbounds_constraints.txt
64+
python3 .ci/scripts/calc_constraints.py -u pyproject.toml > upperbounds_constraints.txt
6565
fi
6666
if [[ "$TEST" = "lowerbounds" ]]; then
67-
python3 .ci/scripts/calc_constraints.py requirements.txt > lowerbounds_constraints.txt
67+
python3 .ci/scripts/calc_constraints.py pyproject.toml > lowerbounds_constraints.txt
6868
fi
6969

7070
if [ -f $POST_BEFORE_INSTALL ]; then

.github/workflows/scripts/publish_plugin_pypi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ then
2828
fi
2929

3030
twine upload -u __token__ -p "$PYPI_API_TOKEN" \
31-
"dist/pulp_python-$VERSION-py3-none-any.whl" \
32-
"dist/pulp-python-$VERSION.tar.gz" \
31+
dist/pulp?python-"$VERSION"-py3-none-any.whl \
32+
dist/pulp?python-"$VERSION".tar.gz \
3333
;

HISTORY.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,8 @@ search = "version = \"{current_version}\""
100100
replace = "version = \"{new_version}\""
101101

102102
[[tool.bumpversion.files]]
103-
filename = "./setup.py"
103+
# This section is managed by the plugin template. Do not edit manually.
104+
105+
filename = "./pyproject.toml"
106+
search = "version = \"{current_version}\""
107+
replace = "version = \"{new_version}\""

0 commit comments

Comments
 (0)