Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,30 @@
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
6 changes: 6 additions & 0 deletions continuous_delivery_scripts/check_licence_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

from continuous_delivery_scripts.language_specifics import get_language_specifics
from continuous_delivery_scripts.spdx_report.licence_assessment import LicenceAssessment
from continuous_delivery_scripts.spdx_report.project_licensing import (
ensure_project_licence_file_conforms,
has_single_project_licence_identifier,
)
from continuous_delivery_scripts.spdx_report.spdx_summary import _configured_licence_policy
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
from continuous_delivery_scripts.utils.logging import log_exception, set_log_level
Expand Down Expand Up @@ -100,6 +104,8 @@ def main() -> int:
set_log_level(args.verbose)

try:
if has_single_project_licence_identifier():
ensure_project_licence_file_conforms(create_if_missing=False)
plugin = get_language_specifics()
if not plugin.can_get_project_metadata():
raise ValueError("The selected language plugin cannot provide metadata for licence compliance checks.")
Expand Down
34 changes: 34 additions & 0 deletions continuous_delivery_scripts/describe_licence_obligations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Describe project licence obligations from public SPDX and OSADL sources."""

import argparse
import logging
import sys

from continuous_delivery_scripts.spdx_report.project_licensing import (
describe_licence_obligations,
)
from continuous_delivery_scripts.utils.logging import log_exception, set_log_level

logger = logging.getLogger(__name__)


def main() -> int:
"""Create a CLI for describing project licence obligations."""
parser = argparse.ArgumentParser(description="Describe licence obligations from SPDX and OSADL data.")
parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.")
args = parser.parse_args()
set_log_level(args.verbose)
try:
print(describe_licence_obligations(), end="")
return 0
except Exception as error:
log_exception(logger, error)
return 1


if __name__ == "__main__":
sys.exit(main())
Loading
Loading