This repository was archived by the owner on Jun 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77VERSION_PY = Path (__file__ ).parent .parent / 'defectdojo_api_generated' / '__init__.py'
88VERSION_RE = re .compile (r"__version__ = '(.*?)'" )
9+ CLI_VERSION_PY = (
10+ Path (__file__ ).parent .parent / 'packages' / 'cli' / 'src' / 'defectdojo_api_generated_cli' / '__init__.py'
11+ )
12+ CLI_DEPENDENCY_PYPROJECT = Path (__file__ ).parent .parent / 'packages' / 'cli' / 'pyproject.toml'
13+ CLI_DEPENDENCY_RE = re .compile (r'("defectdojo-api-generated==)([^"]+)(")' )
914
1015
1116def main ():
@@ -22,6 +27,12 @@ def main():
2227
2328 if args .set :
2429 VERSION_PY .write_text (VERSION_RE .sub (f"__version__ = '{ args .set } '" , data ))
30+ cli_version_data = CLI_VERSION_PY .read_text ()
31+ CLI_VERSION_PY .write_text (VERSION_RE .sub (f"__version__ = '{ args .set } '" , cli_version_data ))
32+ cli_pyproject_data = CLI_DEPENDENCY_PYPROJECT .read_text ()
33+ CLI_DEPENDENCY_PYPROJECT .write_text (
34+ CLI_DEPENDENCY_RE .sub (rf'\g<1>{ args .set } \g<3>' , cli_pyproject_data )
35+ )
2536 print (f'New version: { args .set } ' )
2637
2738
Original file line number Diff line number Diff line change @@ -57,21 +57,25 @@ jobs:
5757 run : |
5858 .github/change_version.py --set '${{ inputs.version }}'
5959 - name : Build
60- run : uv run pyproject-build
60+ run : |
61+ rm -rf dist packages/cli/dist
62+ uv run pyproject-build
63+ uv run pyproject-build packages/cli
6164 - name : Publish
6265 env :
6366 TWINE_USERNAME : __token__
6467 TWINE_PASSWORD : ${{ secrets.twine_token }}
65- run : uv run twine upload --verbose --repository ${{ inputs.repository }} dist/*
68+ run : uv run twine upload --verbose --repository ${{ inputs.repository }} dist/* packages/cli/dist/*
6669 - name : highlight
6770 run : |
6871 INDEX=""
6972 if [ "${{ inputs.repository }}" != "pypi" ]; then
7073 INDEX=" -i ${{ inputs.repository }}"
7174 fi
7275 cat <<EOF >> ${GITHUB_STEP_SUMMARY}
73- \`example\` uploaded to ${{ inputs.repository }}
76+ Packages uploaded to ${{ inputs.repository }}
7477 \`\`\`
7578 pip install${INDEX} defectdojo-api-generated==${{ inputs.version }}
79+ pip install${INDEX} defectdojo-api-generated-cli==${{ inputs.version }}
7680 \`\`\`
7781 EOF
Original file line number Diff line number Diff line change 3333 run : |
3434 make lint-check
3535
36+ - name : Build CLI package
37+ run : |
38+ uv run pyproject-build packages/cli
39+
3640 unit-tests :
3741 runs-on : ubuntu-latest
3842 strategy :
5054 - name : Install dependencies
5155 run : |
5256 pip install uv
53- uv sync --dev --extra cli
57+ uv sync --dev
5458
5559 - name : Run unit tests
5660 run : |
7680 - name : Install dependencies
7781 run : |
7882 pip install uv
79- uv sync --dev --extra cli
83+ uv sync --dev
8084
8185 - name : Run e2e tests
8286 run : |
96100 - name : Install dependencies
97101 run : |
98102 pip install uv
99- uv sync --dev --extra cli
103+ uv sync --dev
100104
101105 - name : build docs
102106 run : |
You can’t perform that action at this time.
0 commit comments