Skip to content

Commit

Permalink
Edited amalgamated file generator, to block REUSE from getting confused
Browse files Browse the repository at this point in the history
It struggled with the copyright lines included as string literals.
  • Loading branch information
rpavlik authored and horenmar committed Aug 19, 2023
1 parent e09de72 commit 5bba3e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/scripts/generateAmalgamatedFiles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
# Copyright Catch2 Authors
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0

import os
import re
Expand All @@ -12,6 +17,8 @@
output_header = os.path.join(catchPath, 'extras', 'catch_amalgamated.hpp')
output_cpp = os.path.join(catchPath, 'extras', 'catch_amalgamated.cpp')

# REUSE-IgnoreStart

# These are the copyright comments in each file, we want to ignore them
copyright_lines = [
'// Copyright Catch2 Authors\n',
Expand Down Expand Up @@ -39,6 +46,8 @@
// ----------------------------------------------------------
'''

# REUSE-IgnoreEnd

# Returns file header with proper version string and generation time
def formatted_file_header(version):
return file_header.format(version_string=version.getVersionString(),
Expand Down

0 comments on commit 5bba3e4

Please sign in to comment.