File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copies the DrString configuration to the projects base folder
3+ #
4+ # Author Pierre Rothmaler
5+ #
6+ # Last revised 23/09/2020
7+
8+ #
9+ # Constants
10+ #
11+
12+ readonly scriptBaseFolderPath=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
13+
14+ #
15+ # Variables
16+ #
17+
18+ projectDir=" $1 "
19+
20+ #
21+ # Check requirements
22+ #
23+
24+ # Check if project directory is provided. If not: Use the scripts base directory.
25+ if [ -z " $1 " ]; then
26+ projectDir=" $scriptBaseFolderPath "
27+ fi
28+
29+ #
30+ # Logic
31+ #
32+
33+ # Go the folder which contains this script
34+ cd " $scriptBaseFolderPath "
35+
36+ # Copy the DrString file to the projects base folder
37+ cp " drstring.toml" " $projectDir /.drstring.toml"
38+
39+ # Go to the project folder and run DrString from there
40+ cd " $projectDir "
41+
42+ DRSTRING_EXECUTABLE=" $scriptBaseFolderPath /drstring"
43+ echo " FOUND PIERRE $DRSTRING_EXECUTABLE "
44+ echo " PIERRE AGAIN $projectDir /.drstring.toml"
45+
46+
47+ theDir=" $( pwd ) "
48+
49+ echo " PIERRE? $theDir "
50+
51+ if [ -f " $DRSTRING_EXECUTABLE " ]; then
52+ " $DRSTRING_EXECUTABLE " check --config-file $projectDir /.drstring.toml || true
53+ else
54+ echo " warning: DrString not installed."
55+ exit 1
56+ fi
Original file line number Diff line number Diff line change 1+ include = [
2+ ' Core/**/*.swift' ,
3+ ]
4+
5+ exclude = [
6+ ' */*.generated.swift' ,
7+ ]
8+
9+ ignore-throws = true
10+
Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ if [ $callSwiftlint = true ]; then
130130 ./SwiftLint/copy-and-run-swiftlint-config.sh " $projectDir " $isFramework $isSwiftUIProject || exit 1;
131131fi
132132
133+ if [ $isFramework = true ]; then
134+ ./DrString/copy-and-run-DrString-config.sh " $projectDir " || exit 1;
135+ fi
136+
133137if [ $copyPRTemplate = true ]; then
134138
135139 mkdir -p " $projectDir /.github"
You can’t perform that action at this time.
0 commit comments