Skip to content

Commit ab1011b

Browse files
author
UrsKahmann
committed
Added --swiftUI flag to main script
1 parent 3c0778f commit ab1011b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

setup-common-project-files.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ readonly noXcodeCheck="--no-xcodecheck"
1717
readonly buildConfigurationFlag="--buildconfig"
1818
readonly targetTypeFlag="--targettype"
1919
readonly breakingInternalFrameworkVersioningFlag="--use-breaking-internal-framework-versioning"
20+
readonly swiftUIFlag="--SwiftUI"
2021

2122
readonly scriptBaseFolderPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2223

@@ -33,6 +34,7 @@ callCodeClimate=true
3334
checkXcodeVersion=true
3435
projectDir="$(pwd)"
3536
isDebugConfiguration=false
37+
isSwiftUIProject=false
3638

3739
#
3840
# Methods
@@ -45,6 +47,7 @@ function display_usage () {
4547
echo -e "$noCodebeatFlag\t\t\t\t- Don't copy the default SMF codebeat configuration"
4648
echo -e "$noCodeClimateFlag\t\t\t- Don't copy the default SMF Code Climate configuration"
4749
echo -e "$breakingInternalFrameworkVersioningFlag\t -Use the \"BreakingInternal framework versioning system\" (only for frameworks)"
50+
echo -e "$swiftUIFlag\t\t\t\t- Use custom SwiftLint rules for swift ui projects"
4851
echo -e "\nUsage:\n$ $0 $noCodebeatFlag"
4952
echo -e "or:\n$ $0 $noCodebeatFlag /Code/Project/Test"
5053
}
@@ -93,6 +96,11 @@ while test $# -gt 0; do
9396
shift
9497
# break
9598
;;
99+
$swiftUIFlag)
100+
isSwiftUIProject=true
101+
shift
102+
# break
103+
;;
96104
$noCodeClimateFlag)
97105
callCodeClimate=false
98106
shift
@@ -123,7 +131,7 @@ cd "$scriptBaseFolderPath"
123131
#
124132

125133
if [ $callSwiftlint = true ]; then
126-
./SwiftLint/copy-and-run-swiftlint-config.sh "$projectDir" $isFramework || exit 1;
134+
./SwiftLint/copy-and-run-swiftlint-config.sh "$projectDir" $isFramework $isSwiftUIProject || exit 1;
127135
fi
128136

129137
if [ $callCodebeat = true ]; then

0 commit comments

Comments
 (0)