File tree 2 files changed +21
-6
lines changed
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,23 @@ public final class Carting {
49
49
type: . output)
50
50
51
51
if let carthage = carthageScript {
52
- carthage. body. inputPaths = inputPathsString
53
- carthage. body. outputPaths = outputPathsString
54
- carthage. body. shellScript = Keys . carthageScript
55
- print ( " ✅ Script \" \( carthageScriptName) \" in target \" \( target. name) \" was successfully updated. " )
56
- projectHasBeenUpdated = true
52
+ var scriptHasBeenUpdated = false
53
+ if carthage. body. inputPaths != inputPathsString {
54
+ carthage. body. inputPaths = inputPathsString
55
+ scriptHasBeenUpdated = true
56
+ }
57
+ if carthage. body. outputPaths != outputPathsString {
58
+ carthage. body. outputPaths = outputPathsString
59
+ scriptHasBeenUpdated = true
60
+ }
61
+ if carthage. body. shellScript != Keys . carthageScript {
62
+ carthage. body. shellScript = Keys . carthageScript
63
+ scriptHasBeenUpdated = true
64
+ }
65
+ if scriptHasBeenUpdated {
66
+ projectHasBeenUpdated = true
67
+ print ( " ✅ Script \" \( carthageScriptName) \" in target \" \( target. name) \" was successfully updated. " )
68
+ }
57
69
}
58
70
else if linkedCarthageFrameworkNames. count > 0 {
59
71
let body = ScriptBody ( inputPaths: inputPathsString,
Original file line number Diff line number Diff line change @@ -30,10 +30,13 @@ final class ScriptBody: BaseScriptBody {
30
30
components. append ( . tripleTab + " outputPaths = \( outputPaths) ; " )
31
31
components. append ( . tripleTab + " runOnlyForDeploymentPostprocessing = \( runOnlyForDeploymentPostprocessing) ; " )
32
32
components. append ( . tripleTab + " shellPath = \( shellPath) ; " )
33
- components. append ( . tripleTab + " shellScript = \( shellScript) ; " )
34
33
if let showEnvVarsInLog = showEnvVarsInLog {
34
+ components. append ( . tripleTab + " shellScript = \( shellScript) ; " )
35
35
components. append ( . tripleTab + " showEnvVarsInLog = \( showEnvVarsInLog) ; \n " )
36
36
}
37
+ else {
38
+ components. append ( . tripleTab + " shellScript = \( shellScript) ; \n " )
39
+ }
37
40
return components. joined ( separator: " \n " )
38
41
}
39
42
You can’t perform that action at this time.
0 commit comments