continuous-delivery-scripts 4.4.2__tar.gz → 4.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {continuous_delivery_scripts-4.4.2/continuous_delivery_scripts.egg-info → continuous_delivery_scripts-4.4.3}/PKG-INFO +4 -4
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/README.md +2 -2
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/_version.py +3 -3
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/check_licence_compliance.py +6 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/generate_news.py +52 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/GOLAND.MD +8 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/PYTHON.MD +4 -2
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/basic.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/ci.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/docker.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/golang.py +44 -14
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/noop.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/python.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/report_third_party_ip.py +14 -3
- continuous_delivery_scripts-4.4.3/continuous_delivery_scripts/spdx_report/spdx_dependency.py +63 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_document.py +78 -56
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_file.py +16 -16
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_helpers.py +23 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_package.py +26 -37
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_project.py +3 -2
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/configuration.py +3 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/language_specifics_base.py +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/package_helpers.py +6 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3/continuous_delivery_scripts.egg-info}/PKG-INFO +4 -4
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts.egg-info/SOURCES.txt +3 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts.egg-info/requires.txt +1 -1
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/setup.py +1 -2
- continuous_delivery_scripts-4.4.3/spdx-tmp/GitPython.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/Jinja2.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/Mako.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/Markdown.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/MarkupSafe.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/PyYAML.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/Pygments.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/SecretStorage.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/beartype.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/boolean.py.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/boto3.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/botocore.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/bracex.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/certifi.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/cffi.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/charset-normalizer.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/click.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/continuous-delivery-scripts.spdx +732 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/cryptography.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/detect-secrets.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/docutils.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/gibberish-detector.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/gitdb.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/id.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/idna.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jaraco.classes.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jaraco.context.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jaraco.functools.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jeepney.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jellyfish.spdx +29 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/jmespath.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/keyring.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/license-expression.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/licenseheaders.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/markdown-it-py.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/mdurl.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/more-itertools.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/nh3.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/packaging.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/pdoc3.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/ply.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/pyautoversion.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/pycparser.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/pyparsing.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/python-dateutil.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/python-dotenv.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/rdflib.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/readme_renderer.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/regex.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/requests-toolbelt.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/requests.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/rfc3986.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/rich.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/s3transfer.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/semantic-version.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/semver.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/setuptools.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/six.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/smmap.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/spdx-tools.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/toml.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/towncrier.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/twine.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/uritools.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/urllib3.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/wcmatch.spdx +30 -0
- continuous_delivery_scripts-4.4.3/spdx-tmp/xmltodict.spdx +30 -0
- continuous_delivery_scripts-4.4.2/continuous_delivery_scripts/spdx_report/spdx_dependency.py +0 -46
- continuous_delivery_scripts-4.4.2/spdx-tmp/GitPython.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Jinja2.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Mako.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Markdown.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/MarkupSafe.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/PyYAML.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/Pygments.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/SecretStorage.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/boolean.py.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/boto3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/botocore.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/bracex.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/certifi.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/cffi.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/charset-normalizer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/click.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/continuous-delivery-scripts.spdx +0 -914
- continuous_delivery_scripts-4.4.2/spdx-tmp/cryptography.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/detect-secrets.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/docutils.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/gibberish-detector.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/gitdb.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/id.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/idna.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.classes.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.context.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jaraco.functools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jeepney.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jellyfish.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/jmespath.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/keyring.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/license-expression.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/licenseheaders.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/markdown-it-py.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/mdurl.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/more-itertools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/nh3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/packaging.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pdoc3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/ply.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pyautoversion.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pycparser.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/pyparsing.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/python-dateutil.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/python-dotenv.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rdflib.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/readme_renderer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/regex.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/requests-toolbelt.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/requests.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rfc3986.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/rich.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/s3transfer.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/semver.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/setuptools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/six.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/smmap.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/spdx-tools.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/toml.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/towncrier.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/twine.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/urllib3.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/wcmatch.spdx +0 -50
- continuous_delivery_scripts-4.4.2/spdx-tmp/xmltodict.spdx +0 -50
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/LICENSE +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/MANIFEST.in +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/assert_news.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/create_news_file.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/detect_secrets.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/generate_docs.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/get_config.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/get_version.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/language_specifics.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/license_files.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/BASIC.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/CI.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/GITHUB_ACTIONS.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/NOOP.MD +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/plugins/github_actions.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/data/licence_assessment.toml +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/licence_assessment.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/scancode_licence_db.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/spdx_summary.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.csv.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.html.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.txt.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/tag_and_release.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/update_secrets_registry.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/aws_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/definitions.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/filesystem_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/git_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/hash_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/logging.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/news_file.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/noop/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/noop/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/python/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/python/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/python/python_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/string_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/third_party_licences.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts/utils/versioning.py +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts.egg-info/dependency_links.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts.egg-info/entry_points.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/continuous_delivery_scripts.egg-info/top_level.txt +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/pyproject.toml +0 -0
- {continuous_delivery_scripts-4.4.2 → continuous_delivery_scripts-4.4.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: continuous-delivery-scripts
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: Git-based CI/CD tools for releases, changelogs, SPDX SBOMs and licence reporting
|
|
5
5
|
Home-page: https://github.com/ARMmbed/continuous-delivery-scripts
|
|
6
6
|
Author: Arm
|
|
@@ -38,7 +38,7 @@ Requires-Dist: boto3
|
|
|
38
38
|
Requires-Dist: detect-secrets[gibberish]==1.5.0
|
|
39
39
|
Requires-Dist: packaging
|
|
40
40
|
Requires-Dist: licenseheaders<0.8.9
|
|
41
|
-
Requires-Dist: spdx-tools==0.
|
|
41
|
+
Requires-Dist: spdx-tools==0.8.5
|
|
42
42
|
Requires-Dist: license-expression
|
|
43
43
|
Requires-Dist: wcmatch
|
|
44
44
|
Requires-Dist: jellyfish
|
|
@@ -246,8 +246,8 @@ same commands whichever CI system the team chooses.
|
|
|
246
246
|
| [`cd-get-config`](./guides/reading-project-configuration.md) | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
247
247
|
| [`cd-tag-and-release`](./guides/automating-releases.md) | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
248
248
|
| [`cd-generate-docs`](./guides/generating-code-documentation.md) | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
249
|
-
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode` | CI audit; developer review also possible |
|
|
250
|
-
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode` | CI gate or developer review |
|
|
249
|
+
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode`, `--skip-dependency-download` | CI audit; developer review also possible |
|
|
250
|
+
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode`, `--skip-dependency-download` | CI gate or developer review |
|
|
251
251
|
| [`cd-license-files`](./guides/licence-header-management.md) | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
252
252
|
| [`cd-record-secrets`](./guides/recording-secrets.md) | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
253
253
|
| [`cd-detect-secrets`](./guides/checking-for-secrets.md) | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
@@ -185,8 +185,8 @@ same commands whichever CI system the team chooses.
|
|
|
185
185
|
| [`cd-get-config`](./guides/reading-project-configuration.md) | Prints a project configuration value. | Either `--key` (`-k`) or `--config-variable` (`-c`) | Developer or CI |
|
|
186
186
|
| [`cd-tag-and-release`](./guides/automating-releases.md) | Runs the release flow, including documentation, licensing summaries, Git tagging, packaging and publication through the selected [language plugin](./continuous_delivery_scripts/plugins). | Required `--release-type` (`-t`); optional `--current-branch` (`-b`) | CI release flow |
|
|
187
187
|
| [`cd-generate-docs`](./guides/generating-code-documentation.md) | Generates code documentation in the configured output directory (or one specified on the command line). | `--output_directory` | Developer preview or CI |
|
|
188
|
-
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode` | CI audit; developer review also possible |
|
|
189
|
-
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode` | CI gate or developer review |
|
|
188
|
+
| [`cd-generate-spdx`](./guides/generating-an-spdx-sbom.md) | Generates SPDX documents and third-party licence summaries, then checks licence compliance when project metadata is available. | Required `--output-dir` (`-o`); optional `--lookup-scancode`, `--skip-dependency-download` | CI audit; developer review also possible |
|
|
189
|
+
| [`cd-check-licence-compliance`](./guides/checking-licence-compliance.md) | Checks project and dependency licences without creating SPDX documents; optionally writes third-party IP summaries. | Optional `--output-dir` (`-o`) for reports, `--lookup-scancode`, `--skip-dependency-download` | CI gate or developer review |
|
|
190
190
|
| [`cd-license-files`](./guides/licence-header-management.md) | Adds or updates source-file licence and copyright headers when the language plugin supports them. | `--verbose` (`-v`) | Developer or CI |
|
|
191
191
|
| [`cd-record-secrets`](./guides/recording-secrets.md) | Records accepted findings in the project's [detect-secrets](https://github.com/Yelp/detect-secrets) registry. | `--registry-file` (`-r`); defaults to the configured registry | Developer (registry maintenance) |
|
|
192
192
|
| [`cd-detect-secrets`](./guides/checking-for-secrets.md) | Checks Git-tracked files against that registry and fails if new secrets are found. | `--registry-file` (`-r`); defaults to the configured registry | CI; developer checks also possible |
|
|
@@ -11,8 +11,8 @@ References
|
|
|
11
11
|
This file is autogenerated, do not modify by hand.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
__version__ = "4.4.
|
|
15
|
-
COMMIT = "
|
|
14
|
+
__version__ = "4.4.3"
|
|
15
|
+
COMMIT = "70dbd3301aab00d8e264da9869bee9df0ed7da25"
|
|
16
16
|
MAJOR = 4
|
|
17
17
|
MINOR = 4
|
|
18
|
-
PATCH =
|
|
18
|
+
PATCH = 3
|
|
@@ -90,6 +90,11 @@ def main() -> int:
|
|
|
90
90
|
action="store_true",
|
|
91
91
|
help="Consult ScanCode LicenseDB for unclassified licences or missing assessment rules.",
|
|
92
92
|
)
|
|
93
|
+
parser.add_argument(
|
|
94
|
+
"--skip-dependency-download",
|
|
95
|
+
action="store_true",
|
|
96
|
+
help="Skip automatic dependency downloads before licence checks and SPDX dependency analysis.",
|
|
97
|
+
)
|
|
93
98
|
parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.")
|
|
94
99
|
args = parser.parse_args()
|
|
95
100
|
set_log_level(args.verbose)
|
|
@@ -98,7 +103,7 @@ def main() -> int:
|
|
|
98
103
|
plugin = get_language_specifics()
|
|
99
104
|
if not plugin.can_get_project_metadata():
|
|
100
105
|
raise ValueError("The selected language plugin cannot provide metadata for licence compliance checks.")
|
|
101
|
-
project = plugin.get_current_spdx_project()
|
|
106
|
+
project = plugin.get_current_spdx_project(skip_dependency_download=args.skip_dependency_download)
|
|
102
107
|
if project is None:
|
|
103
108
|
raise ValueError("The selected language plugin did not return a project for licence compliance checks.")
|
|
104
109
|
if args.lookup_scancode:
|
|
@@ -9,7 +9,9 @@ import sys
|
|
|
9
9
|
import argparse
|
|
10
10
|
import logging
|
|
11
11
|
import os
|
|
12
|
+
import re
|
|
12
13
|
import subprocess
|
|
14
|
+
from pathlib import Path
|
|
13
15
|
from continuous_delivery_scripts.utils.versioning import calculate_version, determine_version_string
|
|
14
16
|
from typing import Optional, Tuple, Dict
|
|
15
17
|
|
|
@@ -20,6 +22,9 @@ from continuous_delivery_scripts.utils.logging import log_exception, set_log_lev
|
|
|
20
22
|
|
|
21
23
|
logger = logging.getLogger(__name__)
|
|
22
24
|
|
|
25
|
+
_MARKDOWN_CHANGELOG_SUFFIXES = {".md", ".markdown"}
|
|
26
|
+
_RELEASE_TITLE_PATTERN = re.compile(r'^"?[vV]?\d+\.\d+\.\d+[^\n]*$')
|
|
27
|
+
|
|
23
28
|
|
|
24
29
|
def version_project(commit_type: CommitType) -> Tuple[bool, Optional[str], Dict[str, str]]:
|
|
25
30
|
"""Versions the project.
|
|
@@ -51,6 +56,53 @@ def _generate_changelog(version: Optional[str], use_news_files: bool) -> None:
|
|
|
51
56
|
project_config_path = configuration.get_value(ConfigurationVariable.PROJECT_CONFIG)
|
|
52
57
|
with cd(os.path.dirname(project_config_path)):
|
|
53
58
|
subprocess.check_call(["towncrier", "build", "--yes", "--name", "", "--version", str(version)])
|
|
59
|
+
# FIXME: Remove this workaround when https://github.com/twisted/towncrier/issues/758 is fixed.
|
|
60
|
+
_normalise_markdown_release_headings(version)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _normalise_markdown_release_headings(version: Optional[str]) -> None:
|
|
64
|
+
"""Promote the latest markdown release title to a heading when Towncrier omits it.
|
|
65
|
+
|
|
66
|
+
Recent Towncrier markdown output renders the release title as plain text but
|
|
67
|
+
still emits section headings with leading `#`. Promote the newest release
|
|
68
|
+
title to a markdown heading and demote its section headings by one level so
|
|
69
|
+
GitHub renders the release block hierarchy correctly.
|
|
70
|
+
"""
|
|
71
|
+
if not version:
|
|
72
|
+
return
|
|
73
|
+
|
|
74
|
+
changelog_path = Path(str(configuration.get_value(ConfigurationVariable.CHANGELOG_FILE_PATH)))
|
|
75
|
+
if changelog_path.suffix.lower() not in _MARKDOWN_CHANGELOG_SUFFIXES or not changelog_path.exists():
|
|
76
|
+
return
|
|
77
|
+
|
|
78
|
+
original = changelog_path.read_text(encoding="utf8")
|
|
79
|
+
lines = original.splitlines()
|
|
80
|
+
version_index = next(
|
|
81
|
+
(index for index, line in enumerate(lines) if line.startswith(f"{version} ") and not line.startswith("#")),
|
|
82
|
+
None,
|
|
83
|
+
)
|
|
84
|
+
if version_index is None:
|
|
85
|
+
return
|
|
86
|
+
|
|
87
|
+
next_release_index = next(
|
|
88
|
+
(
|
|
89
|
+
index
|
|
90
|
+
for index in range(version_index + 1, len(lines))
|
|
91
|
+
if _RELEASE_TITLE_PATTERN.match(lines[index]) and not lines[index].startswith("#")
|
|
92
|
+
),
|
|
93
|
+
len(lines),
|
|
94
|
+
)
|
|
95
|
+
section_indexes = [index for index in range(version_index + 1, next_release_index) if lines[index].startswith("# ")]
|
|
96
|
+
if not section_indexes:
|
|
97
|
+
return
|
|
98
|
+
|
|
99
|
+
lines[version_index] = f"# {lines[version_index]}"
|
|
100
|
+
for index in section_indexes:
|
|
101
|
+
lines[index] = f"#{lines[index]}"
|
|
102
|
+
|
|
103
|
+
rendered = "\n".join(lines) + ("\n" if original.endswith("\n") else "")
|
|
104
|
+
if rendered != original:
|
|
105
|
+
changelog_path.write_text(rendered, encoding="utf8")
|
|
54
106
|
|
|
55
107
|
|
|
56
108
|
def main() -> None:
|
|
@@ -20,6 +20,13 @@ usable `go-licenses` binary on `PATH` before installing
|
|
|
20
20
|
must be available; an installed binary can also be located under `GOBIN` or
|
|
21
21
|
the first `GOPATH` entry's `bin` directory.
|
|
22
22
|
|
|
23
|
+
For licence and SPDX analysis, the plugin also runs `go mod download all` for
|
|
24
|
+
each detected Go module by default so callers do not need a separate dependency
|
|
25
|
+
prefetch step. If your environment already downloads dependencies and you want
|
|
26
|
+
to skip that work, use `--skip-dependency-download` on
|
|
27
|
+
`cd-check-licence-compliance` or `cd-generate-spdx`, or set
|
|
28
|
+
`SKIP_DEPENDENCY_DOWNLOAD_FOR_LICENSING = true` in configuration.
|
|
29
|
+
|
|
23
30
|
Set `PROGRAMMING_LANGUAGE = "golang"`, `PROJECT_NAME`, `PROJECT_ROOT` and
|
|
24
31
|
`SOURCE_DIR` in `[ProjectConfig]`. Put a `go.mod` under the source or project
|
|
25
32
|
root; `go.work` modules and nested Go modules are also considered. Supply
|
|
@@ -27,7 +34,7 @@ root; `go.work` modules and nested Go modules are also considered. Supply
|
|
|
27
34
|
and `[spdx]` namespace fields as explained in the
|
|
28
35
|
[SPDX configuration guide](../../DEVELOPMENT.md#spdx-document-identity).
|
|
29
36
|
|
|
30
|
-
With the project
|
|
37
|
+
With the project available, run:
|
|
31
38
|
|
|
32
39
|
```bash
|
|
33
40
|
mkdir -p licensing
|
|
@@ -17,8 +17,10 @@ The plugin uses [pdoc](https://pdoc3.github.io/pdoc/) to generate the code refer
|
|
|
17
17
|
|
|
18
18
|
The Python plugin reads metadata from the **installed** project distribution and
|
|
19
19
|
walks its `Requires-Dist` entries to find installed, transitive dependencies.
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Install the dependencies you intend to audit, then run the audit in that
|
|
21
|
+
environment; the plugin does not install packages itself. This is deliberate:
|
|
22
|
+
Python projects can define dependencies in many different ways, so CDS cannot
|
|
23
|
+
reliably infer and reproduce the intended audit environment automatically.
|
|
22
24
|
|
|
23
25
|
> **Warning — platform limitation:** The audit only sees dependencies installed
|
|
24
26
|
> for the current platform and Python version. It does **not** inspect
|
|
@@ -51,6 +51,6 @@ class Basic(BaseLanguage):
|
|
|
51
51
|
"""States whether project metadata can be retrieved."""
|
|
52
52
|
return False
|
|
53
53
|
|
|
54
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
54
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
55
55
|
"""Basic."""
|
|
56
56
|
return None
|
|
@@ -61,7 +61,7 @@ class CI(BaseLanguage):
|
|
|
61
61
|
"""States whether project metadata can be retrieved."""
|
|
62
62
|
return False
|
|
63
63
|
|
|
64
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
64
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
65
65
|
"""Gets current SPDX description."""
|
|
66
66
|
# TODO
|
|
67
67
|
return None
|
|
@@ -53,7 +53,7 @@ class Docker(BaseLanguage):
|
|
|
53
53
|
"""States whether project metadata can be retrieved."""
|
|
54
54
|
return False
|
|
55
55
|
|
|
56
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
56
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
57
57
|
"""Gets current SPDX description."""
|
|
58
58
|
# TODO
|
|
59
59
|
return None
|
|
@@ -44,16 +44,18 @@ ROOT_DIR = Path(str(configuration.get_value(ConfigurationVariable.PROJECT_ROOT))
|
|
|
44
44
|
ENVVAR_GORELEASER_GIT_TOKEN = "GITHUB_TOKEN"
|
|
45
45
|
ENVVAR_GORELEASER_CUSTOMISED_TAG = "GORELEASER_CURRENT_TAG"
|
|
46
46
|
ENVVAR_GO_MOD = "GO111MODULE"
|
|
47
|
+
ENVVAR_GO_WORK = "GOWORK"
|
|
47
48
|
GO_MOD_ON_VALUE = "on"
|
|
49
|
+
GO_WORK_OFF_VALUE = "off"
|
|
48
50
|
# go-licenses report --template receives Name, Version, LicenseURL and LicenseName for each library.
|
|
49
51
|
# https://github.com/google/go-licenses/blob/master/README.md#reports-with-custom-templates
|
|
50
52
|
GO_LICENSES_TEMPLATE = "{{range .}}{{.Name}}\t{{.Version}}\t{{.LicenseURL}}\t{{.LicenseName}}\n{{end}}"
|
|
51
53
|
LICENCE_FILE_PREFIXES = ("LICENSE", "LICENCE", "COPYING")
|
|
52
54
|
|
|
53
55
|
|
|
54
|
-
def _generate_doc2go_command_list(output_directory: Path, module: str) -> List[str]:
|
|
56
|
+
def _generate_doc2go_command_list(executable: str, output_directory: Path, module: str) -> List[str]:
|
|
55
57
|
return [
|
|
56
|
-
|
|
58
|
+
executable,
|
|
57
59
|
"-out",
|
|
58
60
|
str(output_directory),
|
|
59
61
|
f"{module}",
|
|
@@ -131,10 +133,35 @@ def _go_licence_module_directories() -> List[Path]:
|
|
|
131
133
|
|
|
132
134
|
def _go_module_name(module_dir: Path, env: MutableMapping[str, str]) -> str:
|
|
133
135
|
"""Read the import path declared by a Go module."""
|
|
134
|
-
|
|
136
|
+
# `go list -m -json` emits one JSON document per main module when a go.work
|
|
137
|
+
# workspace is active. Disable workspace mode here so CDS always reads the
|
|
138
|
+
# module declared by `module_dir` rather than the whole workspace.
|
|
139
|
+
module_env = dict(env)
|
|
140
|
+
module_env[ENVVAR_GO_WORK] = GO_WORK_OFF_VALUE
|
|
141
|
+
module = json.loads(check_output(["go", "list", "-m", "-json"], cwd=module_dir, env=module_env, encoding="utf8"))
|
|
135
142
|
return str(module["Path"])
|
|
136
143
|
|
|
137
144
|
|
|
145
|
+
def _download_go_module_dependencies(module_directories: List[Path], env: MutableMapping[str, str]) -> None:
|
|
146
|
+
"""Download Go dependencies for each detected module.
|
|
147
|
+
|
|
148
|
+
`go-licenses` expects the module graph to be available locally. Fetching the
|
|
149
|
+
dependencies here means callers do not need a separate CI step before
|
|
150
|
+
running `cd-check-licence-compliance` or `cd-generate-spdx`.
|
|
151
|
+
"""
|
|
152
|
+
for module_directory in module_directories:
|
|
153
|
+
logger.info("Downloading Go module dependencies in [%s].", module_directory)
|
|
154
|
+
check_call(["go", "mod", "download", "all"], cwd=module_directory, env=env)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _should_download_go_module_dependencies() -> bool:
|
|
158
|
+
"""Return whether Go module dependencies should be prefetched automatically."""
|
|
159
|
+
configured = configuration.get_value_or_default(ConfigurationVariable.SKIP_DEPENDENCY_DOWNLOAD_FOR_LICENSING, False)
|
|
160
|
+
if isinstance(configured, str):
|
|
161
|
+
configured = configured.strip().lower() in ("true", "1", "yes", "on")
|
|
162
|
+
return not bool(configured)
|
|
163
|
+
|
|
164
|
+
|
|
138
165
|
def _parse_go_licences(output: str) -> List[PackageMetadata]:
|
|
139
166
|
"""Translate go-licenses template output into shared package metadata."""
|
|
140
167
|
packages = []
|
|
@@ -226,15 +253,20 @@ def _stage_root_licence_files_for_modules(module_directories: List[Path]) -> Ite
|
|
|
226
253
|
class GoProjectMetadataFetcher(ProjectMetadataFetcher):
|
|
227
254
|
"""Retrieve Go dependency licences for the shared SPDX and compliance report."""
|
|
228
255
|
|
|
229
|
-
def __init__(self) -> None:
|
|
256
|
+
def __init__(self, skip_dependency_download: bool = False) -> None:
|
|
230
257
|
"""Initialise with the configured project name."""
|
|
231
258
|
super().__init__(str(configuration.get_value(ConfigurationVariable.PROJECT_NAME)))
|
|
259
|
+
self._skip_dependency_download = skip_dependency_download
|
|
232
260
|
|
|
233
261
|
def fetch_project_metadata(self) -> ProjectMetadata:
|
|
234
262
|
"""Collect module dependencies using go-licenses without replacing shared policy checks."""
|
|
235
263
|
module_directories = _go_licence_module_directories()
|
|
236
264
|
env = os.environ.copy()
|
|
237
265
|
env[ENVVAR_GO_MOD] = GO_MOD_ON_VALUE
|
|
266
|
+
if not self._skip_dependency_download and _should_download_go_module_dependencies():
|
|
267
|
+
_download_go_module_dependencies(module_directories, env)
|
|
268
|
+
else:
|
|
269
|
+
logger.info("Skipping Go module dependency downloads before licence analysis by configuration.")
|
|
238
270
|
executable = _ensure_go_tool_installed(
|
|
239
271
|
tool_name="go-licenses",
|
|
240
272
|
version_command=["go-licenses", "report", "--help"],
|
|
@@ -301,7 +333,7 @@ def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
|
301
333
|
"""Call doc2go for generating the docs."""
|
|
302
334
|
env = os.environ
|
|
303
335
|
env[ENVVAR_GO_MOD] = GO_MOD_ON_VALUE
|
|
304
|
-
_ensure_go_tool_installed(
|
|
336
|
+
executable = _ensure_go_tool_installed(
|
|
305
337
|
tool_name="doc2go",
|
|
306
338
|
version_command=["doc2go", "-version"],
|
|
307
339
|
install_command=_install_doc2go_command_list(),
|
|
@@ -309,13 +341,11 @@ def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
|
309
341
|
)
|
|
310
342
|
logger.info("Creating Code documentation.")
|
|
311
343
|
logger.info("Running doc2go over [%s] in [%s].", module, SRC_DIR)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
# )
|
|
318
|
-
logger.warning("Currently not running doc2go")
|
|
344
|
+
check_call(
|
|
345
|
+
_generate_doc2go_command_list(executable, output_directory, module),
|
|
346
|
+
cwd=str(SRC_DIR),
|
|
347
|
+
env=env,
|
|
348
|
+
)
|
|
319
349
|
|
|
320
350
|
|
|
321
351
|
def _call_goreleaser_check(version: str) -> None:
|
|
@@ -464,9 +494,9 @@ class Go(BaseLanguage):
|
|
|
464
494
|
(r"^\.github[\\/]workflows[\\/].*"),
|
|
465
495
|
]
|
|
466
496
|
|
|
467
|
-
def get_current_spdx_project(self) -> Optional[SpdxProject]:
|
|
497
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional[SpdxProject]:
|
|
468
498
|
"""Gets current SPDX description."""
|
|
469
|
-
return SpdxProject(GoProjectMetadataFetcher())
|
|
499
|
+
return SpdxProject(GoProjectMetadataFetcher(skip_dependency_download=skip_dependency_download))
|
|
470
500
|
|
|
471
501
|
def should_clean_before_packaging(self) -> bool:
|
|
472
502
|
"""States whether the repository must be cleaned before packaging happens."""
|
|
@@ -53,7 +53,7 @@ class NoOp(BaseLanguage):
|
|
|
53
53
|
"""States whether project metadata can be retrieved."""
|
|
54
54
|
return False
|
|
55
55
|
|
|
56
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
56
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
57
57
|
"""No Op."""
|
|
58
58
|
return None
|
|
59
59
|
|
|
@@ -198,6 +198,6 @@ class Python(BaseLanguage):
|
|
|
198
198
|
# FIXME Comment out SPDX package as no longer working
|
|
199
199
|
return False
|
|
200
200
|
|
|
201
|
-
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
|
|
201
|
+
def get_current_spdx_project(self, skip_dependency_download: bool = False) -> Optional["SpdxProject"]:
|
|
202
202
|
"""Gets the current SPDX description."""
|
|
203
203
|
return _get_current_spdx_project()
|
|
@@ -36,9 +36,11 @@ def generate_spdx_project_reports(project: "SpdxProject", output_directory: Path
|
|
|
36
36
|
return project
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def generate_spdx_reports(
|
|
39
|
+
def generate_spdx_reports(
|
|
40
|
+
output_directory: Path, lookup_scancode: bool = False, skip_dependency_download: bool = False
|
|
41
|
+
) -> Optional["SpdxProject"]:
|
|
40
42
|
"""Generates all the SPDX reports for the current project."""
|
|
41
|
-
project = get_language_specifics().get_current_spdx_project()
|
|
43
|
+
project = get_language_specifics().get_current_spdx_project(skip_dependency_download=skip_dependency_download)
|
|
42
44
|
if not project:
|
|
43
45
|
return None
|
|
44
46
|
if lookup_scancode:
|
|
@@ -66,6 +68,11 @@ def main() -> int:
|
|
|
66
68
|
action="store_true",
|
|
67
69
|
help="Consult ScanCode LicenseDB for unclassified licences or missing assessment rules.",
|
|
68
70
|
)
|
|
71
|
+
parser.add_argument(
|
|
72
|
+
"--skip-dependency-download",
|
|
73
|
+
action="store_true",
|
|
74
|
+
help="Skip automatic dependency downloads before licence checks and SPDX dependency analysis.",
|
|
75
|
+
)
|
|
69
76
|
|
|
70
77
|
parser.add_argument(
|
|
71
78
|
"-v",
|
|
@@ -79,7 +86,11 @@ def main() -> int:
|
|
|
79
86
|
|
|
80
87
|
try:
|
|
81
88
|
if get_language_specifics().can_get_project_metadata():
|
|
82
|
-
project = generate_spdx_reports(
|
|
89
|
+
project = generate_spdx_reports(
|
|
90
|
+
args.output_dir,
|
|
91
|
+
lookup_scancode=args.lookup_scancode,
|
|
92
|
+
skip_dependency_download=args.skip_dependency_download,
|
|
93
|
+
)
|
|
83
94
|
if project:
|
|
84
95
|
project.check_licence_compliance()
|
|
85
96
|
if args.lookup_scancode:
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
#
|
|
5
|
+
"""Definition of dependency SPDX Document."""
|
|
6
|
+
|
|
7
|
+
import re
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
from continuous_delivery_scripts.utils.hash_helpers import generate_uuid_based_on_str
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from spdx_tools.spdx.model.external_document_ref import ExternalDocumentRef
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class DependencySpdxDocumentRef:
|
|
17
|
+
"""SPDX external document describing dependency.
|
|
18
|
+
|
|
19
|
+
Keep each third-party dependency in a separate SPDX file and link its
|
|
20
|
+
package to the project through an external document reference.
|
|
21
|
+
See https://spdx.org/spdx-specification-21-web-version#h.h430e9ypa0j9
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
def __init__(self, name: str, namespace: str, checksum: str, package_id: str) -> None:
|
|
25
|
+
"""Constructor."""
|
|
26
|
+
self._document_name = name
|
|
27
|
+
self._document_namespace = namespace
|
|
28
|
+
self._document_checksum = checksum
|
|
29
|
+
self._package_id = package_id
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def document_ref_id(self) -> str:
|
|
33
|
+
"""Return a stable SPDX-safe external document identifier."""
|
|
34
|
+
safe_name = (
|
|
35
|
+
self._document_name
|
|
36
|
+
if re.fullmatch(r"[A-Za-z0-9.-]+", self._document_name)
|
|
37
|
+
else str(generate_uuid_based_on_str(self._document_name))
|
|
38
|
+
)
|
|
39
|
+
return f"DocumentRef-{safe_name}"
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def package_spdx_id(self) -> str:
|
|
43
|
+
"""Return the referenced package identifier in the external document."""
|
|
44
|
+
return f"{self.document_ref_id}:SPDXRef-{self._package_id}"
|
|
45
|
+
|
|
46
|
+
def generate_external_reference(self) -> "ExternalDocumentRef":
|
|
47
|
+
"""Generates the external SPDX reference.
|
|
48
|
+
|
|
49
|
+
e.g.
|
|
50
|
+
ExternalDocumentRef:DocumentRef-spdx-tool-1.2
|
|
51
|
+
http://spdx.org/spdxdocs/spdx-tools- v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301
|
|
52
|
+
SHA1: d6a770ba38583e d4bb4525bd96e50461655d2759
|
|
53
|
+
Returns:
|
|
54
|
+
corresponding reference
|
|
55
|
+
"""
|
|
56
|
+
from spdx_tools.spdx.model.checksum import Checksum, ChecksumAlgorithm
|
|
57
|
+
from spdx_tools.spdx.model.external_document_ref import ExternalDocumentRef
|
|
58
|
+
|
|
59
|
+
return ExternalDocumentRef(
|
|
60
|
+
document_ref_id=self.document_ref_id,
|
|
61
|
+
document_uri=self._document_namespace,
|
|
62
|
+
checksum=Checksum(ChecksumAlgorithm.SHA1, self._document_checksum),
|
|
63
|
+
)
|