Skip to content

Commit 2358cf7

Browse files
committed
Apply plugin_template
1 parent 03711b0 commit 2358cf7

File tree

9 files changed

+31
-18
lines changed

9 files changed

+31
-18
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-container-client":
65+
if (
66+
not req.name.startswith("opentelemetry")
67+
and req.name != "pulp-container-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-405-g3845bbc

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
test:
5757
needs: "build"
5858
uses: "./.github/workflows/test.yml"
59+
with:
60+
matrix_env: |
61+
[{"TEST": "pulp"}, {"TEST": "azure"}, {"TEST": "s3"}, {"TEST": "lowerbounds"}]
5962
6063
deprecations:
6164
runs-on: "ubuntu-latest"

.github/workflows/nightly.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
test:
3030
needs: "build"
3131
uses: "./.github/workflows/test.yml"
32+
with:
33+
matrix_env: |
34+
[{"TEST": "pulp"}, {"TEST": "azure"}, {"TEST": "s3"}, {"TEST": "lowerbounds"}]
3235
3336
changelog:
3437
runs-on: ubuntu-latest
@@ -65,3 +68,4 @@ jobs:
6568
branch: "changelog/update"
6669
delete-branch: true
6770
path: "pulp_container"
71+
...

.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_container-$VERSION-py3-none-any.whl" \
32-
"dist/pulp-container-$VERSION.tar.gz" \
31+
dist/pulp?container-"$VERSION"-py3-none-any.whl \
32+
dist/pulp?container-"$VERSION".tar.gz \
3333
;

.github/workflows/test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
name: "Test"
1010
on:
1111
workflow_call:
12+
inputs:
13+
matrix_env:
14+
required: true
15+
type: string
1216

1317
defaults:
1418
run:
@@ -20,11 +24,7 @@ jobs:
2024
strategy:
2125
fail-fast: false
2226
matrix:
23-
env:
24-
- TEST: pulp
25-
- TEST: azure
26-
- TEST: s3
27-
- TEST: lowerbounds
27+
env: ${{ fromJSON(inputs.matrix_env) }}
2828

2929
steps:
3030
- uses: "actions/checkout@v4"
@@ -88,10 +88,6 @@ jobs:
8888
ANSIBLE_FORCE_COLOR: "1"
8989
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
9090
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
91-
- uses: ruby/setup-ruby@v1
92-
if: ${{ env.TEST == 'pulp' }}
93-
with:
94-
ruby-version: "2.6"
9591

9692
- name: "Install"
9793
run: |

pyproject.toml

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

115115
[[tool.bumpversion.files]]
116-
filename = "./setup.py"
116+
# This section is managed by the plugin template. Do not edit manually.
117+
118+
filename = "./pyproject.toml"
119+
search = "version = \"{current_version}\""
120+
replace = "version = \"{new_version}\""

0 commit comments

Comments
 (0)