From 83d6d3409357fb7c34e2797d795f20b028176b35 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 3 Jun 2024 16:06:05 -0500 Subject: [PATCH] added script for removing all logging text files with xcconfig. Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 33 ++++++++++++++++++++++++++++ VDS/SupportingFiles/vds-dev.xcconfig | 11 ++++++++++ VDS/SupportingFiles/vds.xcconfig | 11 ++++++++++ 3 files changed, 55 insertions(+) create mode 100644 VDS/SupportingFiles/vds-dev.xcconfig create mode 100644 VDS/SupportingFiles/vds.xcconfig diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index 39a21260..98494e61 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -319,6 +319,8 @@ EA6642942BCEBF9500D81DC4 /* TextLinkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextLinkModel.swift; sourceTree = ""; }; EA6F330D2B911E9000BACAB9 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; EA78C7952C00CAC200430AD1 /* Groupable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Groupable.swift; sourceTree = ""; }; + EA78C7A12C0E63D200430AD1 /* vds-dev.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "vds-dev.xcconfig"; sourceTree = ""; }; + EA78C7A22C0E63DD00430AD1 /* vds.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = vds.xcconfig; sourceTree = ""; }; EA81410A2A0E8E3C004F60D2 /* ButtonIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonIcon.swift; sourceTree = ""; }; EA81410F2A127066004F60D2 /* UIColor+VDSColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+VDSColor.swift"; sourceTree = ""; }; EA89200328AECF4B006B9984 /* UITextField+Publisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Publisher.swift"; sourceTree = ""; }; @@ -770,6 +772,8 @@ EA3361FF2891E14C0071C351 /* Fonts */, EAA5EEB828ECD24B003B3210 /* Icons.xcassets */, EA5F86CB2A1D28B500BC83E4 /* ReleaseNotes.txt */, + EA78C7A12C0E63D200430AD1 /* vds-dev.xcconfig */, + EA78C7A22C0E63DD00430AD1 /* vds.xcconfig */, ); path = SupportingFiles; sourceTree = ""; @@ -1080,6 +1084,7 @@ EA336168288B19200071C351 /* Sources */, EA336169288B19200071C351 /* Frameworks */, EA33616A288B19200071C351 /* Resources */, + EA78C79E2C0E4FFB00430AD1 /* Remove ChangeLog.txt Files */, ); buildRules = ( ); @@ -1194,6 +1199,28 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + EA78C79E2C0E4FFB00430AD1 /* Remove ChangeLog.txt Files */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Remove ChangeLog.txt Files"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\necho \"TARGET_BUILD_DIR: ${TARGET_BUILD_DIR}\"\necho \"UNLOCALIZED_RESOURCES_FOLDER_PATH: ${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\necho \"Build Directory: ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nenv\n\nif [ $VDS_REMOVE_CHANGELOG_FILES -eq 1 ]; then \n echo \"Removing ChangeLog.txt files...\"\n \n # Find all files matching the pattern recursively\n TXT_FILES=$(find \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\" -name \"*ChangeLog.txt\")\n\n # Remove each file \n for FILE in $TXT_FILES; do \n echo \"File: $FILE\"\n rm $FILE\n echo \"Removed $FILE\"\n done\n\n TXT_FILES=$(find \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\" -name \"ReleaseNotes.txt\")\n\n # Remove each file \n for FILE in $TXT_FILES; do \n echo \"File: $FILE\"\n rm $FILE\n echo \"Removed $FILE\"\n done\n\n\nelse \n echo \"Skipping removal of ChangeLog.txt files\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ EA336168288B19200071C351 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -1389,6 +1416,7 @@ /* Begin XCBuildConfiguration section */ EA33617E288B19210071C351 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A12C0E63D200430AD1 /* vds-dev.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -1452,6 +1480,7 @@ }; EA33617F288B19210071C351 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A22C0E63DD00430AD1 /* vds.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -1509,6 +1538,7 @@ }; EA336181288B19210071C351 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A12C0E63D200430AD1 /* vds-dev.xcconfig */; buildSettings = { BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; @@ -1546,6 +1576,7 @@ }; EA336182288B19210071C351 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A22C0E63DD00430AD1 /* vds.xcconfig */; buildSettings = { BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; @@ -1583,6 +1614,7 @@ }; EA336184288B19210071C351 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A12C0E63D200430AD1 /* vds-dev.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -1600,6 +1632,7 @@ }; EA336185288B19210071C351 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = EA78C7A22C0E63DD00430AD1 /* vds.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; diff --git a/VDS/SupportingFiles/vds-dev.xcconfig b/VDS/SupportingFiles/vds-dev.xcconfig new file mode 100644 index 00000000..a7f6cb81 --- /dev/null +++ b/VDS/SupportingFiles/vds-dev.xcconfig @@ -0,0 +1,11 @@ +// +// vds-dev.xcconfig +// VDS +// +// Created by Matt Bruce on 6/3/24. +// + +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include? "../../../workspaceSettings.xcconfig" diff --git a/VDS/SupportingFiles/vds.xcconfig b/VDS/SupportingFiles/vds.xcconfig new file mode 100644 index 00000000..3080486b --- /dev/null +++ b/VDS/SupportingFiles/vds.xcconfig @@ -0,0 +1,11 @@ +// +// vds.xcconfig +// VDS +// +// Created by Matt Bruce on 6/3/24. +// + +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include? "../../../workspaceSettings.xcconfig"