ScriptCollection 4.3.43__py3-none-any.whl → 4.3.45__py3-none-any.whl
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.
- ScriptCollection/Executables.py +17 -24
- ScriptCollection/ScriptCollectionCore.py +36 -33
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +21 -4
- {scriptcollection-4.3.43.dist-info → scriptcollection-4.3.45.dist-info}/METADATA +1 -1
- {scriptcollection-4.3.43.dist-info → scriptcollection-4.3.45.dist-info}/RECORD +8 -8
- {scriptcollection-4.3.43.dist-info → scriptcollection-4.3.45.dist-info}/entry_points.txt +1 -2
- {scriptcollection-4.3.43.dist-info → scriptcollection-4.3.45.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.43.dist-info → scriptcollection-4.3.45.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -21,12 +21,11 @@ Caution: This script can cause harm if you pass a wrong inputfolder-argument.'''
|
|
|
21
21
|
|
|
22
22
|
parser.add_argument('--printtableheadline', type=GeneralUtilities.string_to_boolean, const=True, default=True, nargs='?', help='Prints column-titles in the name-mapping-csv-file')
|
|
23
23
|
parser.add_argument('--namemappingfile', default="NameMapping.csv", help='Specifies the file where the name-mapping will be written to')
|
|
24
|
-
parser.add_argument('--extensions', default="exe,py,sh",
|
|
25
|
-
help='Comma-separated list of file-extensions of files where this tool should be applied. Use "*" to obfuscate all')
|
|
24
|
+
parser.add_argument('--extensions', default="exe,py,sh", help='Comma-separated list of file-extensions of files where this tool should be applied. Use "*" to obfuscate all')
|
|
26
25
|
parser.add_argument('--inputfolder', help='Specifies the foldere where the files are stored whose names should be obfuscated', required=True)
|
|
27
26
|
|
|
28
27
|
args = parser.parse_args()
|
|
29
|
-
ScriptCollectionCore().
|
|
28
|
+
ScriptCollectionCore().filenameObfuscator(args.inputfolder, args.printtableheadline, args.namemappingfile, args.extensions)
|
|
30
29
|
return 0
|
|
31
30
|
|
|
32
31
|
|
|
@@ -41,7 +40,7 @@ This script does not process subfolders transitively.''')
|
|
|
41
40
|
parser.add_argument('--extensions', default="exe,py,sh", help='Comma-separated list of file-extensions of files where this tool should be applied. Use "*" to obfuscate all')
|
|
42
41
|
args = parser.parse_args()
|
|
43
42
|
|
|
44
|
-
ScriptCollectionCore().
|
|
43
|
+
ScriptCollectionCore().createISOFileWithObfuscatedFiles(args.inputfolder, args.outputfile, args.printtableheadline, not args.createnoisofile, args.extensions)
|
|
45
44
|
return 0
|
|
46
45
|
|
|
47
46
|
|
|
@@ -49,7 +48,7 @@ def ChangeHashOfProgram() -> int:
|
|
|
49
48
|
parser = argparse.ArgumentParser(description='Changes the hash-value of arbitrary files by appending data at the end of the file.')
|
|
50
49
|
parser.add_argument('--inputfile', help='Specifies the script/executable-file whose hash-value should be changed', required=True)
|
|
51
50
|
args = parser.parse_args()
|
|
52
|
-
ScriptCollectionCore().
|
|
51
|
+
ScriptCollectionCore().changeHashOfProgram(args.inputfile)
|
|
53
52
|
return 0
|
|
54
53
|
|
|
55
54
|
|
|
@@ -64,7 +63,7 @@ def CalculateBitcoinBlockHash() -> int:
|
|
|
64
63
|
args = parser.parse_args()
|
|
65
64
|
|
|
66
65
|
args = parser.parse_args()
|
|
67
|
-
GeneralUtilities.write_message_to_stdout(ScriptCollectionCore().
|
|
66
|
+
GeneralUtilities.write_message_to_stdout(ScriptCollectionCore().calculateBitcoinBlockHash(args.version, args.previousblockhash, args.transactionsmerkleroot, args.timestamp, args.target, args.nonce))
|
|
68
67
|
return 0
|
|
69
68
|
|
|
70
69
|
|
|
@@ -88,7 +87,7 @@ Hints:
|
|
|
88
87
|
-30 is the commonly used value for the period""")
|
|
89
88
|
parser.add_argument('csvfile', help='File where the 2fa-codes are stored')
|
|
90
89
|
args = parser.parse_args()
|
|
91
|
-
ScriptCollectionCore().
|
|
90
|
+
ScriptCollectionCore().show2FAAsQRCode(args.csvfile)
|
|
92
91
|
return 0
|
|
93
92
|
|
|
94
93
|
|
|
@@ -100,7 +99,7 @@ This program prints all files where the given searchstring was found to the cons
|
|
|
100
99
|
parser.add_argument('searchstring', help='string to look for')
|
|
101
100
|
|
|
102
101
|
args = parser.parse_args()
|
|
103
|
-
ScriptCollectionCore().
|
|
102
|
+
ScriptCollectionCore().searchInFiles(args.folder, args.searchstring)
|
|
104
103
|
return 0
|
|
105
104
|
|
|
106
105
|
|
|
@@ -115,7 +114,7 @@ def ReplaceSubstringsInFilenames() -> int:
|
|
|
115
114
|
|
|
116
115
|
args = parser.parse_args()
|
|
117
116
|
|
|
118
|
-
ScriptCollectionCore().
|
|
117
|
+
ScriptCollectionCore().replaceSubstringsInFilenames(args.folder, args.substringInFilename, args.newSubstringInFilename, args.conflictResolveMode)
|
|
119
118
|
return 0
|
|
120
119
|
|
|
121
120
|
|
|
@@ -126,7 +125,7 @@ def GenerateSnkFiles() -> int:
|
|
|
126
125
|
parser.add_argument('--amountofkeys', default='10')
|
|
127
126
|
|
|
128
127
|
args = parser.parse_args()
|
|
129
|
-
ScriptCollectionCore().
|
|
128
|
+
ScriptCollectionCore().generateSnkFiles(args.outputfolder, args.keysize, args.amountofkeys)
|
|
130
129
|
return 0
|
|
131
130
|
|
|
132
131
|
|
|
@@ -142,14 +141,15 @@ def OrganizeLinesInFile() -> int:
|
|
|
142
141
|
parser.add_argument('--ignored_start_character', default="", help='Characters which should not be considered at the begin of a line')
|
|
143
142
|
|
|
144
143
|
args = parser.parse_args()
|
|
145
|
-
ScriptCollectionCore().
|
|
144
|
+
ScriptCollectionCore().organize_lines_in_file(args.file, args.encoding, args.sort, args.remove_duplicated_lines, args.ignore_first_line, args.remove_empty_lines, list(args.ignored_start_character))
|
|
146
145
|
|
|
147
146
|
|
|
148
|
-
def
|
|
147
|
+
def CreateHashOfFolder() -> int:
|
|
149
148
|
parser = argparse.ArgumentParser(description='Calculates the SHA-256-value of all files in the given folder and stores the hash-value in a file next to the hashed file.')
|
|
150
|
-
parser.add_argument('folder', help='Folder where the files are stored which should be hashed')
|
|
149
|
+
parser.add_argument('folder', default=".", help='Folder where the files are stored which should be hashed')
|
|
151
150
|
args = parser.parse_args()
|
|
152
|
-
|
|
151
|
+
folder:str=GeneralUtilities.resolve_relative_path(args.folder,os.getcwd())
|
|
152
|
+
ScriptCollectionCore().create_hash_of_folder(folder)
|
|
153
153
|
return 0
|
|
154
154
|
|
|
155
155
|
|
|
@@ -163,7 +163,7 @@ def CreateSimpleMergeWithoutRelease() -> int:
|
|
|
163
163
|
parser.add_argument('--no-remove-sourcebranch', dest='removesourcebranch', action='store_false', help='TODO')
|
|
164
164
|
parser.set_defaults(removesourcebranch=False)
|
|
165
165
|
args = parser.parse_args()
|
|
166
|
-
ScriptCollectionCore().
|
|
166
|
+
ScriptCollectionCore().createSimpleMergeWithoutRelease(args.repository, args.sourcebranch, args.targetbranch, args.remotename, args.removesourcebranch)
|
|
167
167
|
return 0
|
|
168
168
|
|
|
169
169
|
|
|
@@ -172,7 +172,7 @@ def CreateEmptyFileWithSpecificSize() -> int:
|
|
|
172
172
|
parser.add_argument('name', help='Specifies the name of the created file')
|
|
173
173
|
parser.add_argument('size', help='Specifies the size of the created file')
|
|
174
174
|
args = parser.parse_args()
|
|
175
|
-
return ScriptCollectionCore().
|
|
175
|
+
return ScriptCollectionCore().createEmptyFileWithSpecificSize(args.name, args.size)
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
def ShowMissingFiles() -> int:
|
|
@@ -241,17 +241,10 @@ Caution: This script can cause harm if you pass a wrong inputfolder-argument.'''
|
|
|
241
241
|
parser.add_argument('--inputfolder', help='Specifies the folder where the files are stored whose names should be obfuscated', required=True)
|
|
242
242
|
|
|
243
243
|
args = parser.parse_args()
|
|
244
|
-
ScriptCollectionCore().
|
|
244
|
+
ScriptCollectionCore().obfuscateFilesFolder(args.inputfolder, args.printtableheadline, args.namemappingfile, args.extensions)
|
|
245
245
|
return 0
|
|
246
246
|
|
|
247
247
|
|
|
248
|
-
def HealthCheck() -> int:
|
|
249
|
-
parser = argparse.ArgumentParser()
|
|
250
|
-
parser.add_argument('--file', required=True)
|
|
251
|
-
args = parser.parse_args()
|
|
252
|
-
return ScriptCollectionCore().SCHealthcheck(args.file)
|
|
253
|
-
|
|
254
|
-
|
|
255
248
|
def BuildCodeUnits() -> int:
|
|
256
249
|
parser = argparse.ArgumentParser()
|
|
257
250
|
|
|
@@ -38,7 +38,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
38
38
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
39
39
|
from .SCLog import SCLog, LogLevel
|
|
40
40
|
|
|
41
|
-
version = "4.3.
|
|
41
|
+
version = "4.3.45"
|
|
42
42
|
__version__ = version
|
|
43
43
|
|
|
44
44
|
class VSCodeWorkspaceShellTask:
|
|
@@ -1000,6 +1000,12 @@ class ScriptCollectionCore:
|
|
|
1000
1000
|
result = self.run_program_argsasarray("git", ["rev-parse", "--abbrev-ref", "HEAD"], repository, throw_exception_if_exitcode_is_not_zero=True)
|
|
1001
1001
|
return result[1].replace("\r", GeneralUtilities.empty_string).replace("\n", GeneralUtilities.empty_string)
|
|
1002
1002
|
|
|
1003
|
+
@GeneralUtilities.check_arguments
|
|
1004
|
+
def git_set_local_configuration_value(self, repository: str, key: str, value: str) -> None:
|
|
1005
|
+
"""Sets a git-configuration-value in the local configuration of the given repository (does not modify the global or system configuration)."""
|
|
1006
|
+
self.assert_is_git_repository(repository)
|
|
1007
|
+
self.run_program_argsasarray("git", ["config", "--local", key, value], repository, throw_exception_if_exitcode_is_not_zero=True)
|
|
1008
|
+
|
|
1003
1009
|
@GeneralUtilities.check_arguments
|
|
1004
1010
|
def git_get_commitid_of_tag(self, repository: str, tag: str) -> str:
|
|
1005
1011
|
self.is_git_or_bare_git_repository(repository)
|
|
@@ -1601,7 +1607,7 @@ class ScriptCollectionCore:
|
|
|
1601
1607
|
GeneralUtilities.write_message_to_stdout(file)
|
|
1602
1608
|
|
|
1603
1609
|
@GeneralUtilities.check_arguments
|
|
1604
|
-
def
|
|
1610
|
+
def createEmptyFileWithSpecificSize(self, name: str, size_string: str) -> int:
|
|
1605
1611
|
if size_string.isdigit():
|
|
1606
1612
|
size = int(size_string)
|
|
1607
1613
|
else:
|
|
@@ -1630,13 +1636,23 @@ class ScriptCollectionCore:
|
|
|
1630
1636
|
return 0
|
|
1631
1637
|
|
|
1632
1638
|
@GeneralUtilities.check_arguments
|
|
1633
|
-
def
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1639
|
+
def create_hash_of_folder(self, folder: str) -> str:
|
|
1640
|
+
hasher = hashlib.sha256()
|
|
1641
|
+
hasher.update(os.path.basename(folder).encode())
|
|
1642
|
+
root = Path(folder)
|
|
1643
|
+
|
|
1644
|
+
for file in sorted(root.rglob("*")):
|
|
1645
|
+
if file.is_file():
|
|
1646
|
+
relative_path =GeneralUtilities.normalize_path(file.relative_to(root).as_posix())
|
|
1647
|
+
hasher.update(relative_path.encode())
|
|
1648
|
+
with file.open("rb") as f:
|
|
1649
|
+
while chunk := f.read(8192):
|
|
1650
|
+
hasher.update(chunk)
|
|
1651
|
+
|
|
1652
|
+
return hasher.hexdigest()
|
|
1637
1653
|
|
|
1638
1654
|
@GeneralUtilities.check_arguments
|
|
1639
|
-
def
|
|
1655
|
+
def createSimpleMergeWithoutRelease(self, repository: str, sourcebranch: str, targetbranch: str, remotename: str, remove_source_branch: bool) -> None:
|
|
1640
1656
|
commitid = self.git_merge(repository, sourcebranch, targetbranch, False, True)
|
|
1641
1657
|
self.git_merge(repository, targetbranch, sourcebranch, True, True)
|
|
1642
1658
|
created_version = self.get_semver_version(repository)
|
|
@@ -1648,7 +1664,7 @@ class ScriptCollectionCore:
|
|
|
1648
1664
|
self.git_remove_branch(repository, sourcebranch)
|
|
1649
1665
|
|
|
1650
1666
|
@GeneralUtilities.check_arguments
|
|
1651
|
-
def
|
|
1667
|
+
def organize_lines_in_file(self, file: str, encoding: str="utf-8", sort: bool = False, remove_duplicated_lines: bool = False, ignore_first_line: bool = False, remove_empty_lines: bool = True, ignored_start_character: list = list()):
|
|
1652
1668
|
GeneralUtilities.assert_file_exists(file)
|
|
1653
1669
|
|
|
1654
1670
|
# read file
|
|
@@ -1692,7 +1708,7 @@ class ScriptCollectionCore:
|
|
|
1692
1708
|
return result
|
|
1693
1709
|
|
|
1694
1710
|
@GeneralUtilities.check_arguments
|
|
1695
|
-
def
|
|
1711
|
+
def generateSnkFiles(self, outputfolder, keysize=4096, amountofkeys=10) -> int:
|
|
1696
1712
|
GeneralUtilities.ensure_directory_exists(outputfolder)
|
|
1697
1713
|
for _ in range(amountofkeys):
|
|
1698
1714
|
file = os.path.join(outputfolder, str(uuid.uuid4())+".snk")
|
|
@@ -1733,7 +1749,7 @@ class ScriptCollectionCore:
|
|
|
1733
1749
|
os.rename(file, new_filename)
|
|
1734
1750
|
|
|
1735
1751
|
@GeneralUtilities.check_arguments
|
|
1736
|
-
def
|
|
1752
|
+
def replaceSubstringsInFilenames(self, folder: str, substringInFilename: str, newSubstringInFilename: str, conflictResolveMode: str) -> None:
|
|
1737
1753
|
for file in GeneralUtilities.absolute_file_paths(folder):
|
|
1738
1754
|
self.__process_file(file, substringInFilename, newSubstringInFilename, conflictResolveMode)
|
|
1739
1755
|
|
|
@@ -1753,7 +1769,7 @@ class ScriptCollectionCore:
|
|
|
1753
1769
|
GeneralUtilities.write_message_to_stdout(file)
|
|
1754
1770
|
|
|
1755
1771
|
@GeneralUtilities.check_arguments
|
|
1756
|
-
def
|
|
1772
|
+
def searchInFiles(self, folder: str, searchstring: str) -> None:
|
|
1757
1773
|
for file in GeneralUtilities.absolute_file_paths(folder):
|
|
1758
1774
|
self.__check_file(file, searchstring)
|
|
1759
1775
|
|
|
@@ -1774,7 +1790,7 @@ class ScriptCollectionCore:
|
|
|
1774
1790
|
GeneralUtilities.write_message_to_stdout(self.get_string_as_qr_code(qrcode_content))
|
|
1775
1791
|
|
|
1776
1792
|
@GeneralUtilities.check_arguments
|
|
1777
|
-
def
|
|
1793
|
+
def show2FAAsQRCode(self, csvfile: str) -> None:
|
|
1778
1794
|
lines = GeneralUtilities.read_csv_file(csvfile, True)
|
|
1779
1795
|
lines.sort(key=lambda items: ''.join(items).lower())
|
|
1780
1796
|
for line in lines:
|
|
@@ -1782,7 +1798,7 @@ class ScriptCollectionCore:
|
|
|
1782
1798
|
GeneralUtilities.write_message_to_stdout(GeneralUtilities.get_longline())
|
|
1783
1799
|
|
|
1784
1800
|
@GeneralUtilities.check_arguments
|
|
1785
|
-
def
|
|
1801
|
+
def calculateBitcoinBlockHash(self, block_version_number: str, previousblockhash: str, transactionsmerkleroot: str, timestamp: str, target: str, nonce: str) -> str:
|
|
1786
1802
|
# Example-values:
|
|
1787
1803
|
# block_version_number: "00000020"
|
|
1788
1804
|
# previousblockhash: "66720b99e07d284bd4fe67ff8c49a5db1dd8514fcdab61000000000000000000"
|
|
@@ -1794,7 +1810,7 @@ class ScriptCollectionCore:
|
|
|
1794
1810
|
return binascii.hexlify(hashlib.sha256(hashlib.sha256(binascii.unhexlify(header)).digest()).digest()[::-1]).decode('utf-8')
|
|
1795
1811
|
|
|
1796
1812
|
@GeneralUtilities.check_arguments
|
|
1797
|
-
def
|
|
1813
|
+
def changeHashOfProgram(self, inputfile: str) -> None:
|
|
1798
1814
|
valuetoappend = str(uuid.uuid4())
|
|
1799
1815
|
|
|
1800
1816
|
outputfile = inputfile + '.modified'
|
|
@@ -1840,12 +1856,12 @@ class ScriptCollectionCore:
|
|
|
1840
1856
|
iso.close()
|
|
1841
1857
|
|
|
1842
1858
|
@GeneralUtilities.check_arguments
|
|
1843
|
-
def
|
|
1859
|
+
def createISOFileWithObfuscatedFiles(self, inputfolder: str, outputfile: str, printtableheadline, createisofile, extensions) -> None:
|
|
1844
1860
|
if (os.path.isdir(inputfolder)):
|
|
1845
1861
|
namemappingfile = "name_map.csv"
|
|
1846
1862
|
files_directory = inputfolder
|
|
1847
1863
|
files_directory_obf = f"{files_directory}_Obfuscated"
|
|
1848
|
-
self.
|
|
1864
|
+
self.obfuscateFilesFolder(
|
|
1849
1865
|
inputfolder, printtableheadline, namemappingfile, extensions)
|
|
1850
1866
|
os.rename(namemappingfile, os.path.join(
|
|
1851
1867
|
files_directory_obf, namemappingfile))
|
|
@@ -1856,7 +1872,7 @@ class ScriptCollectionCore:
|
|
|
1856
1872
|
raise ValueError(f"Directory not found: '{inputfolder}'")
|
|
1857
1873
|
|
|
1858
1874
|
@GeneralUtilities.check_arguments
|
|
1859
|
-
def
|
|
1875
|
+
def filenameObfuscator(self, inputfolder: str, printtableheadline, namemappingfile: str, extensions: str) -> None:
|
|
1860
1876
|
obfuscate_all_files = extensions == "*"
|
|
1861
1877
|
if (obfuscate_all_files):
|
|
1862
1878
|
obfuscate_file_extensions = None
|
|
@@ -1894,22 +1910,9 @@ class ScriptCollectionCore:
|
|
|
1894
1910
|
return True
|
|
1895
1911
|
return False
|
|
1896
1912
|
|
|
1897
|
-
@GeneralUtilities.check_arguments
|
|
1898
|
-
def SCHealthcheck(self, file: str) -> int:
|
|
1899
|
-
lines = GeneralUtilities.read_lines_from_file(file)
|
|
1900
|
-
for line in reversed(lines):
|
|
1901
|
-
if not GeneralUtilities.string_is_none_or_whitespace(line):
|
|
1902
|
-
if "RunningHealthy (" in line: # TODO use regex
|
|
1903
|
-
GeneralUtilities.write_message_to_stderr(f"Healthy running due to line '{line}' in file '{file}'.")
|
|
1904
|
-
return 0
|
|
1905
|
-
else:
|
|
1906
|
-
GeneralUtilities.write_message_to_stderr(f"Not healthy running due to line '{line}' in file '{file}'.")
|
|
1907
|
-
return 1
|
|
1908
|
-
GeneralUtilities.write_message_to_stderr(f"No valid line found for healthycheck in file '{file}'.")
|
|
1909
|
-
return 2
|
|
1910
1913
|
|
|
1911
1914
|
@GeneralUtilities.check_arguments
|
|
1912
|
-
def
|
|
1915
|
+
def obfuscateFilesFolder(self, inputfolder: str, printtableheadline, namemappingfile: str, extensions: str) -> None:
|
|
1913
1916
|
obfuscate_all_files = extensions == "*"
|
|
1914
1917
|
if (obfuscate_all_files):
|
|
1915
1918
|
obfuscate_file_extensions = None
|
|
@@ -1924,10 +1927,10 @@ class ScriptCollectionCore:
|
|
|
1924
1927
|
if (os.path.isdir(inputfolder)):
|
|
1925
1928
|
for file in GeneralUtilities.absolute_file_paths(inputfolder):
|
|
1926
1929
|
if obfuscate_all_files or self.__extension_matchs(file, obfuscate_file_extensions):
|
|
1927
|
-
self.
|
|
1930
|
+
self.changeHashOfProgram(file)
|
|
1928
1931
|
os.remove(file)
|
|
1929
1932
|
os.rename(file + ".modified", file)
|
|
1930
|
-
self.
|
|
1933
|
+
self.filenameObfuscator(inputfolder, printtableheadline, namemappingfile, extensions)
|
|
1931
1934
|
else:
|
|
1932
1935
|
raise ValueError(f"Directory not found: '{inputfolder}'")
|
|
1933
1936
|
|
|
@@ -62,6 +62,9 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
62
62
|
if self.is_pre_merge():
|
|
63
63
|
GeneralUtilities.assert_condition(not self.__assert_no_new_changes,f"A pre-merge build can not be done with the assert-no-new-changes-option.")
|
|
64
64
|
|
|
65
|
+
#disable autocrlf for this repository so git does not rewrite line-endings on checkout/commit. otherwise the line-endings normalized by __normalize_line_endings_of_common_files would be converted back to crlf, which results in spurious uncommitted changes (and therefore in failing assert-no-new-changes-builds) on windows.
|
|
66
|
+
self.sc.git_set_local_configuration_value(self.repository, "core.autocrlf", "false")
|
|
67
|
+
|
|
65
68
|
|
|
66
69
|
#ensure <repo>/.ScriptCollection/.gitignore is set up (ignores the cache-folder so cache-files never show up as uncommitted changes)
|
|
67
70
|
self.sc.ensure_scriptcollection_gitignore_is_setup(self.repository)
|
|
@@ -106,7 +109,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
106
109
|
self.sc.log.log(GeneralUtilities.get_line())
|
|
107
110
|
|
|
108
111
|
self.search_for_secrets()
|
|
109
|
-
self.
|
|
112
|
+
self.__normalize_line_endings_of_common_files()
|
|
110
113
|
self.tfcps_tools_general.generate_svg_files_from_plantuml_files_for_repository(self.repository, self.use_cache())
|
|
111
114
|
|
|
112
115
|
if self.is_pre_merge():
|
|
@@ -131,15 +134,29 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
131
134
|
|
|
132
135
|
if self.__assert_no_new_changes:
|
|
133
136
|
self.sc.assert_no_uncommitted_changes(self.repository,"There are new uncommitted changes in the repository.")
|
|
137
|
+
|
|
138
|
+
self.__log_hashes_of_artifacts(codeunits)
|
|
139
|
+
|
|
134
140
|
end_time:datetime=GeneralUtilities.get_now()
|
|
135
141
|
duration=end_time-start_time
|
|
136
142
|
self.sc.log.log(f"Finished building codeunits at {GeneralUtilities.datetime_to_string_for_readable_entry(end_time,False)}. (Duration: {GeneralUtilities.timedelta_to_simple_string(duration)})")
|
|
137
143
|
self.sc.log.log(GeneralUtilities.get_line())
|
|
138
144
|
|
|
139
145
|
@GeneralUtilities.check_arguments
|
|
140
|
-
def
|
|
141
|
-
|
|
142
|
-
for
|
|
146
|
+
def __log_hashes_of_artifacts(self, codeunits:list[str]) -> None:
|
|
147
|
+
self.sc.log.log("Hashes of the artifacts of the codeunits:")
|
|
148
|
+
for codeunit_name in codeunits:
|
|
149
|
+
artifacts_folder = os.path.join(self.repository, codeunit_name, "Other", "Artifacts")
|
|
150
|
+
if os.path.isdir(artifacts_folder):
|
|
151
|
+
hash_of_artifacts:str = self.sc.create_hash_of_folder(artifacts_folder)
|
|
152
|
+
self.sc.log.log(f" - {codeunit_name}: {hash_of_artifacts}")
|
|
153
|
+
else:
|
|
154
|
+
self.sc.log.log(f" - {codeunit_name}: (no artifacts-folder available)")
|
|
155
|
+
|
|
156
|
+
@GeneralUtilities.check_arguments
|
|
157
|
+
def __normalize_line_endings_of_common_files(self) -> None:
|
|
158
|
+
#TODO add option to define exceptions (means: files which should not be normalized).
|
|
159
|
+
for text_file_extension in [".txt", ".md", ".json", ".xml", ".csv", ".yml", ".yaml"]:
|
|
143
160
|
for text_file in self.sc.get_not_git_ignored_files_of_folder(self.repository, text_file_extension):
|
|
144
161
|
self.sc.normalize_line_endings(text_file)
|
|
145
162
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.45
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ScriptCollection/AnionBuildPlatform.py,sha256=GP-jnb1GbvT8jzlH-cqnxgOzBzeUdiaWnDXtKNjsxiA,12153
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
|
|
3
|
-
ScriptCollection/Executables.py,sha256=
|
|
3
|
+
ScriptCollection/Executables.py,sha256=Kb4w9R1FELEj0c_ASX32Ls9qyjm3IV_5gyQkW1ENToY,67738
|
|
4
4
|
ScriptCollection/GeneralUtilities.py,sha256=qYhrKkwbEewGIppuxYRmGhLP50C443tw7sBlwH7Mkbc,71606
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=yYaC95h40uszuZPggn2kK3qXIN2ZjGMCavo-NQ53ElQ,1537
|
|
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=LdzSJy3NnnwYCCefz2h4tiTy4BjT8lOz3IBG_bMOg9E,4821
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=nVHnWHjJypfFvTmTEJSmsxQpkBMKv68xy8-Dhu5pOBI,242335
|
|
13
13
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
|
|
14
14
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=WO2M28c2tUwsXFNa2L9zqMhdlyObWm3qpPE0LdIs7SE,2315
|
|
@@ -35,7 +35,7 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
|
|
|
35
35
|
ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
|
|
36
36
|
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=H9FWlS6BPK-UWJXdWN686ePky4Hq-Q13T0Kx8HSJu7s,34990
|
|
37
37
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
|
|
38
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
38
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=ufnDoe_YIMGlB-kyW_1mOKXUOl93PdmkktcjLneoB_s,32292
|
|
39
39
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
|
|
40
40
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
|
|
41
41
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
|
|
@@ -63,8 +63,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
|
|
|
63
63
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
65
65
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
-
scriptcollection-4.3.
|
|
67
|
-
scriptcollection-4.3.
|
|
68
|
-
scriptcollection-4.3.
|
|
69
|
-
scriptcollection-4.3.
|
|
70
|
-
scriptcollection-4.3.
|
|
66
|
+
scriptcollection-4.3.45.dist-info/METADATA,sha256=0Td9MA6qKnHyygnHdCy2emQTpxI1B0zMua19eEn9YjE,7648
|
|
67
|
+
scriptcollection-4.3.45.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
68
|
+
scriptcollection-4.3.45.dist-info/entry_points.txt,sha256=xWOFHGufgef8jsKQ3c2pFBfM_hjweFXuxfKmghQs-VI,5814
|
|
69
|
+
scriptcollection-4.3.45.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
70
|
+
scriptcollection-4.3.45.dist-info/RECORD,,
|
|
@@ -14,7 +14,7 @@ sccreatechangelogentry = ScriptCollection.Executables:CreateChangelogEntry
|
|
|
14
14
|
sccreateemptyfilewithspecificsize = ScriptCollection.Executables:CreateEmptyFileWithSpecificSize
|
|
15
15
|
sccreatefile = ScriptCollection.Executables:CreateFile
|
|
16
16
|
sccreatefolder = ScriptCollection.Executables:CreateFolder
|
|
17
|
-
|
|
17
|
+
sccreatehashoffolder = ScriptCollection.Executables:CreateHashOfFolder
|
|
18
18
|
sccreateisofilewithobfuscatedfiles = ScriptCollection.Executables:CreateISOFileWithObfuscatedFiles
|
|
19
19
|
sccreaterelease = ScriptCollection.Executables:CreateRelease
|
|
20
20
|
sccreatesimplemergewithoutrelease = ScriptCollection.Executables:CreateSimpleMergeWithoutRelease
|
|
@@ -39,7 +39,6 @@ scgeneratesnkfiles = ScriptCollection.Executables:GenerateSnkFiles
|
|
|
39
39
|
scgeneratetaskfilefromworkspacefile = ScriptCollection.Executables:GenerateTaskfileFromWorkspacefile
|
|
40
40
|
scgeneratethumbnail = ScriptCollection.Executables:GenerateThumbnail
|
|
41
41
|
scgetsize = ScriptCollection.Executables:GetSize
|
|
42
|
-
schealthcheck = ScriptCollection.Executables:Healthcheck
|
|
43
42
|
sckeyboarddiagnosis = ScriptCollection.Executables:KeyboardDiagnosis
|
|
44
43
|
sclistfoldercontent = ScriptCollection.Executables:ListFolderContent
|
|
45
44
|
scloc = ScriptCollection.Executables:LOC
|
|
File without changes
|
|
File without changes
|