@invarn/cibuild 1.3.16 → 1.3.17

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.
Files changed (242) hide show
  1. package/dist/cli.cjs +1 -1
  2. package/dist/src/cli.d.ts +3 -0
  3. package/dist/src/cli.d.ts.map +1 -0
  4. package/dist/src/cli.js +987 -0
  5. package/dist/src/commands/android-scanner.d.ts +32 -0
  6. package/dist/src/commands/android-scanner.d.ts.map +1 -0
  7. package/dist/src/commands/android-scanner.js +667 -0
  8. package/dist/src/commands/build.d.ts +5 -0
  9. package/dist/src/commands/build.d.ts.map +1 -0
  10. package/dist/src/commands/build.js +1096 -0
  11. package/dist/src/commands/edit.d.ts +3 -0
  12. package/dist/src/commands/edit.d.ts.map +1 -0
  13. package/dist/src/commands/edit.js +651 -0
  14. package/dist/src/commands/file-secret-collector.d.ts +37 -0
  15. package/dist/src/commands/file-secret-collector.d.ts.map +1 -0
  16. package/dist/src/commands/file-secret-collector.js +199 -0
  17. package/dist/src/commands/github-workflow.d.ts +5 -0
  18. package/dist/src/commands/github-workflow.d.ts.map +1 -0
  19. package/dist/src/commands/github-workflow.js +45 -0
  20. package/dist/src/commands/ios-scanner.d.ts +27 -0
  21. package/dist/src/commands/ios-scanner.d.ts.map +1 -0
  22. package/dist/src/commands/ios-scanner.js +337 -0
  23. package/dist/src/commands/reset.d.ts +7 -0
  24. package/dist/src/commands/reset.d.ts.map +1 -0
  25. package/dist/src/commands/reset.js +81 -0
  26. package/dist/src/commands/secrets-sync-workflow.d.ts +15 -0
  27. package/dist/src/commands/secrets-sync-workflow.d.ts.map +1 -0
  28. package/dist/src/commands/secrets-sync-workflow.js +255 -0
  29. package/dist/src/commands/secrets-upload.d.ts +21 -0
  30. package/dist/src/commands/secrets-upload.d.ts.map +1 -0
  31. package/dist/src/commands/secrets-upload.js +177 -0
  32. package/dist/src/commands/secrets-upload.test.d.ts +5 -0
  33. package/dist/src/commands/secrets-upload.test.d.ts.map +1 -0
  34. package/dist/src/commands/secrets-upload.test.js +60 -0
  35. package/dist/src/config.d.ts +3 -0
  36. package/dist/src/config.d.ts.map +1 -0
  37. package/dist/src/config.js +46 -0
  38. package/dist/src/envman/cli.d.ts +21 -0
  39. package/dist/src/envman/cli.d.ts.map +1 -0
  40. package/dist/src/envman/cli.js +240 -0
  41. package/dist/src/envman/envman.d.ts +83 -0
  42. package/dist/src/envman/envman.d.ts.map +1 -0
  43. package/dist/src/envman/envman.js +361 -0
  44. package/dist/src/envman/envman.test.d.ts +5 -0
  45. package/dist/src/envman/envman.test.d.ts.map +1 -0
  46. package/dist/src/envman/envman.test.js +236 -0
  47. package/dist/src/envman/index.d.ts +23 -0
  48. package/dist/src/envman/index.d.ts.map +1 -0
  49. package/dist/src/envman/index.js +23 -0
  50. package/dist/src/envman/types.d.ts +55 -0
  51. package/dist/src/envman/types.d.ts.map +1 -0
  52. package/dist/src/envman/types.js +12 -0
  53. package/dist/src/lib.d.ts +27 -0
  54. package/dist/src/lib.d.ts.map +1 -0
  55. package/dist/src/lib.js +32 -0
  56. package/dist/src/pipeline.d.ts +3 -0
  57. package/dist/src/pipeline.d.ts.map +1 -0
  58. package/dist/src/pipeline.js +57 -0
  59. package/dist/src/runner.d.ts +17 -0
  60. package/dist/src/runner.d.ts.map +1 -0
  61. package/dist/src/runner.js +234 -0
  62. package/dist/src/types.d.ts +57 -0
  63. package/dist/src/types.d.ts.map +1 -0
  64. package/dist/src/types.js +2 -0
  65. package/dist/src/yaml/bitrise-compat.d.ts +65 -0
  66. package/dist/src/yaml/bitrise-compat.d.ts.map +1 -0
  67. package/dist/src/yaml/bitrise-compat.js +206 -0
  68. package/dist/src/yaml/bitrise-compat.test.d.ts +5 -0
  69. package/dist/src/yaml/bitrise-compat.test.d.ts.map +1 -0
  70. package/dist/src/yaml/bitrise-compat.test.js +347 -0
  71. package/dist/src/yaml/converter.d.ts +33 -0
  72. package/dist/src/yaml/converter.d.ts.map +1 -0
  73. package/dist/src/yaml/converter.js +222 -0
  74. package/dist/src/yaml/converter.test.d.ts +5 -0
  75. package/dist/src/yaml/converter.test.d.ts.map +1 -0
  76. package/dist/src/yaml/converter.test.js +348 -0
  77. package/dist/src/yaml/e2e.test.d.ts +6 -0
  78. package/dist/src/yaml/e2e.test.d.ts.map +1 -0
  79. package/dist/src/yaml/e2e.test.js +446 -0
  80. package/dist/src/yaml/env-resolver.d.ts +120 -0
  81. package/dist/src/yaml/env-resolver.d.ts.map +1 -0
  82. package/dist/src/yaml/env-resolver.js +405 -0
  83. package/dist/src/yaml/env-resolver.test.d.ts +5 -0
  84. package/dist/src/yaml/env-resolver.test.d.ts.map +1 -0
  85. package/dist/src/yaml/env-resolver.test.js +502 -0
  86. package/dist/src/yaml/interactive-prompts.d.ts +71 -0
  87. package/dist/src/yaml/interactive-prompts.d.ts.map +1 -0
  88. package/dist/src/yaml/interactive-prompts.js +258 -0
  89. package/dist/src/yaml/missing-env-handler.d.ts +45 -0
  90. package/dist/src/yaml/missing-env-handler.d.ts.map +1 -0
  91. package/dist/src/yaml/missing-env-handler.js +64 -0
  92. package/dist/src/yaml/parser.d.ts +33 -0
  93. package/dist/src/yaml/parser.d.ts.map +1 -0
  94. package/dist/src/yaml/parser.js +145 -0
  95. package/dist/src/yaml/pipeline-with-secrets.d.ts +25 -0
  96. package/dist/src/yaml/pipeline-with-secrets.d.ts.map +1 -0
  97. package/dist/src/yaml/pipeline-with-secrets.js +76 -0
  98. package/dist/src/yaml/platform-detector.d.ts +83 -0
  99. package/dist/src/yaml/platform-detector.d.ts.map +1 -0
  100. package/dist/src/yaml/platform-detector.js +188 -0
  101. package/dist/src/yaml/platform-detector.test.d.ts +5 -0
  102. package/dist/src/yaml/platform-detector.test.d.ts.map +1 -0
  103. package/dist/src/yaml/platform-detector.test.js +414 -0
  104. package/dist/src/yaml/preflight-validation.d.ts +40 -0
  105. package/dist/src/yaml/preflight-validation.d.ts.map +1 -0
  106. package/dist/src/yaml/preflight-validation.js +152 -0
  107. package/dist/src/yaml/secrets-manager.d.ts +77 -0
  108. package/dist/src/yaml/secrets-manager.d.ts.map +1 -0
  109. package/dist/src/yaml/secrets-manager.js +219 -0
  110. package/dist/src/yaml/step-validator.d.ts +54 -0
  111. package/dist/src/yaml/step-validator.d.ts.map +1 -0
  112. package/dist/src/yaml/step-validator.js +403 -0
  113. package/dist/src/yaml/steps/android-sign.d.ts +35 -0
  114. package/dist/src/yaml/steps/android-sign.d.ts.map +1 -0
  115. package/dist/src/yaml/steps/android-sign.js +147 -0
  116. package/dist/src/yaml/steps/android-version.d.ts +26 -0
  117. package/dist/src/yaml/steps/android-version.d.ts.map +1 -0
  118. package/dist/src/yaml/steps/android-version.js +128 -0
  119. package/dist/src/yaml/steps/android-version.test.d.ts +5 -0
  120. package/dist/src/yaml/steps/android-version.test.d.ts.map +1 -0
  121. package/dist/src/yaml/steps/android-version.test.js +196 -0
  122. package/dist/src/yaml/steps/android.d.ts +95 -0
  123. package/dist/src/yaml/steps/android.d.ts.map +1 -0
  124. package/dist/src/yaml/steps/android.js +916 -0
  125. package/dist/src/yaml/steps/app-store-deploy.d.ts +48 -0
  126. package/dist/src/yaml/steps/app-store-deploy.d.ts.map +1 -0
  127. package/dist/src/yaml/steps/app-store-deploy.js +162 -0
  128. package/dist/src/yaml/steps/base.d.ts +238 -0
  129. package/dist/src/yaml/steps/base.d.ts.map +1 -0
  130. package/dist/src/yaml/steps/base.js +345 -0
  131. package/dist/src/yaml/steps/bitrise-android-tools.d.ts +26 -0
  132. package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +1 -0
  133. package/dist/src/yaml/steps/bitrise-android-tools.js +198 -0
  134. package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +5 -0
  135. package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +1 -0
  136. package/dist/src/yaml/steps/bitrise-android-tools.test.js +280 -0
  137. package/dist/src/yaml/steps/bitrise-apk-info.d.ts +22 -0
  138. package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +1 -0
  139. package/dist/src/yaml/steps/bitrise-apk-info.js +144 -0
  140. package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +5 -0
  141. package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +1 -0
  142. package/dist/src/yaml/steps/bitrise-apk-info.test.js +331 -0
  143. package/dist/src/yaml/steps/bitrise-slack.d.ts +49 -0
  144. package/dist/src/yaml/steps/bitrise-slack.d.ts.map +1 -0
  145. package/dist/src/yaml/steps/bitrise-slack.js +280 -0
  146. package/dist/src/yaml/steps/bitrise-slack.test.d.ts +5 -0
  147. package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +1 -0
  148. package/dist/src/yaml/steps/bitrise-slack.test.js +484 -0
  149. package/dist/src/yaml/steps/bitrise-ssh.d.ts +27 -0
  150. package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +1 -0
  151. package/dist/src/yaml/steps/bitrise-ssh.js +134 -0
  152. package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +5 -0
  153. package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +1 -0
  154. package/dist/src/yaml/steps/bitrise-ssh.test.js +205 -0
  155. package/dist/src/yaml/steps/cache.d.ts +52 -0
  156. package/dist/src/yaml/steps/cache.d.ts.map +1 -0
  157. package/dist/src/yaml/steps/cache.js +351 -0
  158. package/dist/src/yaml/steps/fastlane.d.ts +27 -0
  159. package/dist/src/yaml/steps/fastlane.d.ts.map +1 -0
  160. package/dist/src/yaml/steps/fastlane.js +79 -0
  161. package/dist/src/yaml/steps/file.d.ts +27 -0
  162. package/dist/src/yaml/steps/file.d.ts.map +1 -0
  163. package/dist/src/yaml/steps/file.js +35 -0
  164. package/dist/src/yaml/steps/flutter.d.ts +63 -0
  165. package/dist/src/yaml/steps/flutter.d.ts.map +1 -0
  166. package/dist/src/yaml/steps/flutter.js +215 -0
  167. package/dist/src/yaml/steps/git-clone.d.ts +26 -0
  168. package/dist/src/yaml/steps/git-clone.d.ts.map +1 -0
  169. package/dist/src/yaml/steps/git-clone.js +111 -0
  170. package/dist/src/yaml/steps/google-play-deploy.d.ts +37 -0
  171. package/dist/src/yaml/steps/google-play-deploy.d.ts.map +1 -0
  172. package/dist/src/yaml/steps/google-play-deploy.js +193 -0
  173. package/dist/src/yaml/steps/google-play-deploy.test.d.ts +5 -0
  174. package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +1 -0
  175. package/dist/src/yaml/steps/google-play-deploy.test.js +310 -0
  176. package/dist/src/yaml/steps/index.d.ts +10 -0
  177. package/dist/src/yaml/steps/index.d.ts.map +1 -0
  178. package/dist/src/yaml/steps/index.js +1361 -0
  179. package/dist/src/yaml/steps/ios-deps.d.ts +43 -0
  180. package/dist/src/yaml/steps/ios-deps.d.ts.map +1 -0
  181. package/dist/src/yaml/steps/ios-deps.js +141 -0
  182. package/dist/src/yaml/steps/ios-deps.test.d.ts +5 -0
  183. package/dist/src/yaml/steps/ios-deps.test.d.ts.map +1 -0
  184. package/dist/src/yaml/steps/ios-deps.test.js +90 -0
  185. package/dist/src/yaml/steps/ios-signing.d.ts +31 -0
  186. package/dist/src/yaml/steps/ios-signing.d.ts.map +1 -0
  187. package/dist/src/yaml/steps/ios-signing.js +144 -0
  188. package/dist/src/yaml/steps/ios-version.d.ts +47 -0
  189. package/dist/src/yaml/steps/ios-version.d.ts.map +1 -0
  190. package/dist/src/yaml/steps/ios-version.js +151 -0
  191. package/dist/src/yaml/steps/linting.d.ts +47 -0
  192. package/dist/src/yaml/steps/linting.d.ts.map +1 -0
  193. package/dist/src/yaml/steps/linting.js +148 -0
  194. package/dist/src/yaml/steps/phase2.test.d.ts +6 -0
  195. package/dist/src/yaml/steps/phase2.test.d.ts.map +1 -0
  196. package/dist/src/yaml/steps/phase2.test.js +197 -0
  197. package/dist/src/yaml/steps/phase3.test.d.ts +5 -0
  198. package/dist/src/yaml/steps/phase3.test.d.ts.map +1 -0
  199. package/dist/src/yaml/steps/phase3.test.js +144 -0
  200. package/dist/src/yaml/steps/phase4.test.d.ts +5 -0
  201. package/dist/src/yaml/steps/phase4.test.d.ts.map +1 -0
  202. package/dist/src/yaml/steps/phase4.test.js +166 -0
  203. package/dist/src/yaml/steps/phase5.test.d.ts +6 -0
  204. package/dist/src/yaml/steps/phase5.test.d.ts.map +1 -0
  205. package/dist/src/yaml/steps/phase5.test.js +263 -0
  206. package/dist/src/yaml/steps/registry.d.ts +88 -0
  207. package/dist/src/yaml/steps/registry.d.ts.map +1 -0
  208. package/dist/src/yaml/steps/registry.js +125 -0
  209. package/dist/src/yaml/steps/registry.test.d.ts +5 -0
  210. package/dist/src/yaml/steps/registry.test.d.ts.map +1 -0
  211. package/dist/src/yaml/steps/registry.test.js +235 -0
  212. package/dist/src/yaml/steps/release.d.ts +50 -0
  213. package/dist/src/yaml/steps/release.d.ts.map +1 -0
  214. package/dist/src/yaml/steps/release.js +154 -0
  215. package/dist/src/yaml/steps/script.d.ts +23 -0
  216. package/dist/src/yaml/steps/script.d.ts.map +1 -0
  217. package/dist/src/yaml/steps/script.js +63 -0
  218. package/dist/src/yaml/steps/spec-validation.test.d.ts +6 -0
  219. package/dist/src/yaml/steps/spec-validation.test.d.ts.map +1 -0
  220. package/dist/src/yaml/steps/spec-validation.test.js +130 -0
  221. package/dist/src/yaml/steps/steps.test.d.ts +6 -0
  222. package/dist/src/yaml/steps/steps.test.d.ts.map +1 -0
  223. package/dist/src/yaml/steps/steps.test.js +474 -0
  224. package/dist/src/yaml/steps/test-config.d.ts +3 -0
  225. package/dist/src/yaml/steps/test-config.d.ts.map +1 -0
  226. package/dist/src/yaml/steps/test-config.js +16 -0
  227. package/dist/src/yaml/steps/xcode-new.test.d.ts +5 -0
  228. package/dist/src/yaml/steps/xcode-new.test.d.ts.map +1 -0
  229. package/dist/src/yaml/steps/xcode-new.test.js +211 -0
  230. package/dist/src/yaml/steps/xcode.d.ts +222 -0
  231. package/dist/src/yaml/steps/xcode.d.ts.map +1 -0
  232. package/dist/src/yaml/steps/xcode.js +999 -0
  233. package/dist/src/yaml/types.d.ts +68 -0
  234. package/dist/src/yaml/types.d.ts.map +1 -0
  235. package/dist/src/yaml/types.js +5 -0
  236. package/dist/src/yaml/validation-types.d.ts +96 -0
  237. package/dist/src/yaml/validation-types.d.ts.map +1 -0
  238. package/dist/src/yaml/validation-types.js +8 -0
  239. package/dist/src/yaml/yaml-updater.d.ts +24 -0
  240. package/dist/src/yaml/yaml-updater.d.ts.map +1 -0
  241. package/dist/src/yaml/yaml-updater.js +128 -0
  242. package/package.json +16 -4
@@ -0,0 +1,151 @@
1
+ /**
2
+ * iOS version management steps: set-xcode-build-number, set-ios-version
3
+ */
4
+ import { BaseStepExecutor } from './base.js';
5
+ /**
6
+ * Updates the Xcode project's build number (CFBundleVersion) and optionally
7
+ * the marketing version (CFBundleShortVersionString) using agvtool and PlistBuddy.
8
+ */
9
+ export class SetXcodeBuildNumberStepExecutor extends BaseStepExecutor {
10
+ getValidationRequirements(inputs, _env, _config) {
11
+ return [
12
+ this.requireCommand('xcodebuild', 'Xcode is required for setting build numbers'),
13
+ ];
14
+ }
15
+ getOutputs() {
16
+ return [
17
+ { name: 'CIBUILD_BUNDLE_VERSION', type: 'environment', description: 'The bundle version that was set' },
18
+ ];
19
+ }
20
+ async execute(inputs, _env, _config) {
21
+ const stepName = 'set-xcode-build-number';
22
+ const projectPath = this.getInput(inputs, 'project_path', '');
23
+ const scheme = this.getInput(inputs, 'scheme', '');
24
+ const target = this.getInput(inputs, 'target', '');
25
+ const buildVersion = this.getInput(inputs, 'build_version', '$CIBUILD_BUILD_NUMBER');
26
+ const buildVersionOffset = this.getInput(inputs, 'build_version_offset', '');
27
+ const buildShortVersionString = this.getInput(inputs, 'build_short_version_string', '');
28
+ const commands = [];
29
+ commands.push('# set-xcode-build-number');
30
+ commands.push('echo "🔢 Setting Xcode build number..."');
31
+ commands.push('');
32
+ // Resolve project path
33
+ if (projectPath) {
34
+ commands.push(`PROJECT_PATH='${this.escapeBash(projectPath)}'`);
35
+ }
36
+ else {
37
+ commands.push('PROJECT_PATH="${CIBUILD_PROJECT_PATH:-}"');
38
+ commands.push('if [ -z "$PROJECT_PATH" ]; then');
39
+ commands.push(' PROJECT_PATH=$(find . -maxdepth 1 -name "*.xcodeproj" | head -1)');
40
+ commands.push('fi');
41
+ }
42
+ commands.push('');
43
+ // Compute build version
44
+ commands.push(`BUILD_VERSION="${buildVersion}"`);
45
+ if (buildVersionOffset) {
46
+ commands.push('# Apply offset to build version');
47
+ commands.push(`OFFSET=${this.escapeBash(buildVersionOffset)}`);
48
+ commands.push('if [[ "$BUILD_VERSION" =~ ^[0-9]+$ ]]; then');
49
+ commands.push(' BUILD_VERSION=$((BUILD_VERSION + OFFSET))');
50
+ commands.push('fi');
51
+ }
52
+ commands.push('echo "Build version: $BUILD_VERSION"');
53
+ commands.push('');
54
+ // Determine project dir for agvtool
55
+ commands.push('# Navigate to project directory');
56
+ commands.push('if [[ "$PROJECT_PATH" == *.xcworkspace ]]; then');
57
+ commands.push(' # For workspaces, look for the .xcodeproj inside');
58
+ commands.push(' PROJECT_DIR="$(dirname "$PROJECT_PATH")"');
59
+ commands.push('else');
60
+ commands.push(' PROJECT_DIR="$(dirname "$PROJECT_PATH")"');
61
+ commands.push('fi');
62
+ commands.push('cd "$PROJECT_DIR"');
63
+ commands.push('');
64
+ // Try agvtool first, fall back to PlistBuddy
65
+ commands.push('# Set build number using agvtool');
66
+ commands.push('if agvtool what-version &>/dev/null; then');
67
+ commands.push(' agvtool new-version -all "$BUILD_VERSION"');
68
+ if (buildShortVersionString) {
69
+ commands.push(` agvtool new-marketing-version '${this.escapeBash(buildShortVersionString)}'`);
70
+ }
71
+ commands.push(' echo "✅ Updated via agvtool"');
72
+ commands.push('else');
73
+ commands.push(' echo "agvtool not available or versioning not enabled — using PlistBuddy"');
74
+ // Find Info.plist
75
+ if (target) {
76
+ commands.push(` INFO_PLIST=$(xcodebuild -target '${this.escapeBash(target)}' -showBuildSettings 2>/dev/null | grep INFOPLIST_FILE | head -1 | awk '{print $3}')`);
77
+ }
78
+ else {
79
+ commands.push(' INFO_PLIST=$(find . -name "Info.plist" -not -path "*/Pods/*" -not -path "*/DerivedData/*" | head -1)');
80
+ }
81
+ commands.push(' if [ -n "$INFO_PLIST" ] && [ -f "$INFO_PLIST" ]; then');
82
+ commands.push(' /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_VERSION" "$INFO_PLIST"');
83
+ if (buildShortVersionString) {
84
+ commands.push(` /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${this.escapeBash(buildShortVersionString)}" "$INFO_PLIST"`);
85
+ }
86
+ commands.push(' echo "✅ Updated Info.plist: $INFO_PLIST"');
87
+ commands.push(' else');
88
+ commands.push(' echo "❌ Error: Could not find Info.plist"');
89
+ commands.push(' exit 1');
90
+ commands.push(' fi');
91
+ commands.push('fi');
92
+ commands.push('');
93
+ // Export
94
+ commands.push('envman add --key CIBUILD_BUNDLE_VERSION --value "$BUILD_VERSION"');
95
+ const script = this.createBashScriptFromCommands(commands, stepName);
96
+ return this.createScriptStep(script, stepName);
97
+ }
98
+ }
99
+ /**
100
+ * Directly edits an Info.plist file to set CFBundleVersion and/or
101
+ * CFBundleShortVersionString using PlistBuddy.
102
+ */
103
+ export class SetIosVersionStepExecutor extends BaseStepExecutor {
104
+ getValidationRequirements(inputs, _env, _config) {
105
+ return [
106
+ this.requireCommand('/usr/libexec/PlistBuddy', 'PlistBuddy is required (macOS built-in)'),
107
+ ];
108
+ }
109
+ getOutputs() {
110
+ return [
111
+ { name: 'CIBUILD_APP_VERSION', type: 'environment', description: 'CFBundleShortVersionString that was set' },
112
+ { name: 'CIBUILD_APP_BUILD', type: 'environment', description: 'CFBundleVersion that was set' },
113
+ ];
114
+ }
115
+ async execute(inputs, _env, _config) {
116
+ const stepName = 'set-ios-version';
117
+ const infoPlistFile = this.getRequiredInput(inputs, 'info_plist_file', stepName);
118
+ const bundleVersion = this.getInput(inputs, 'bundle_version', '');
119
+ const bundleVersionShort = this.getInput(inputs, 'bundle_version_short', '');
120
+ const commands = [];
121
+ commands.push('# set-ios-version — edit Info.plist directly');
122
+ commands.push(`INFO_PLIST='${this.escapeBash(infoPlistFile)}'`);
123
+ commands.push('');
124
+ commands.push('if [ ! -f "$INFO_PLIST" ]; then');
125
+ commands.push(' echo "❌ Error: Info.plist not found: $INFO_PLIST"');
126
+ commands.push(' exit 1');
127
+ commands.push('fi');
128
+ commands.push('');
129
+ if (bundleVersion) {
130
+ commands.push(`echo "Setting CFBundleVersion to: ${this.escapeBash(bundleVersion)}"`);
131
+ commands.push(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${this.escapeBash(bundleVersion)}" "$INFO_PLIST"`);
132
+ commands.push('');
133
+ }
134
+ if (bundleVersionShort) {
135
+ commands.push(`echo "Setting CFBundleShortVersionString to: ${this.escapeBash(bundleVersionShort)}"`);
136
+ commands.push(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${this.escapeBash(bundleVersionShort)}" "$INFO_PLIST"`);
137
+ commands.push('');
138
+ }
139
+ // Read back and export
140
+ commands.push('# Read back values and export');
141
+ commands.push('FINAL_VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$INFO_PLIST" 2>/dev/null || echo "")');
142
+ commands.push('FINAL_BUILD=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$INFO_PLIST" 2>/dev/null || echo "")');
143
+ commands.push('echo "✅ Version: $FINAL_VERSION ($FINAL_BUILD)"');
144
+ commands.push('');
145
+ commands.push('envman add --key CIBUILD_APP_VERSION --value "$FINAL_VERSION"');
146
+ commands.push('envman add --key CIBUILD_APP_BUILD --value "$FINAL_BUILD"');
147
+ const script = this.createBashScriptFromCommands(commands, stepName);
148
+ return this.createScriptStep(script, stepName);
149
+ }
150
+ }
151
+ //# sourceMappingURL=ios-version.js.map
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Linting steps: swiftlint, detekt
3
+ */
4
+ import { BaseStepExecutor } from './base.js';
5
+ import type { StepDef, CIConfig } from '../../types.js';
6
+ import type { ValidationRequirement, StepOutput } from '../validation-types.js';
7
+ export interface SwiftlintInputs {
8
+ /** Path where SwiftLint should lint */
9
+ linting_path?: string;
10
+ /** Range of linting: all | changed */
11
+ lint_range?: string;
12
+ /** Path to .swiftlint.yml config */
13
+ lint_config_file?: string;
14
+ /** Reporter style (xcode, json, html, junit, etc.) */
15
+ reporter?: string;
16
+ /** Use strict mode (yes/no) */
17
+ strict?: string;
18
+ /** Use quiet mode (yes/no) */
19
+ quiet?: string;
20
+ }
21
+ /**
22
+ * Runs SwiftLint on the project with config and reporter options.
23
+ */
24
+ export declare class SwiftlintStepExecutor extends BaseStepExecutor {
25
+ getValidationRequirements(_inputs: SwiftlintInputs, _env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
26
+ getOutputs(): StepOutput[];
27
+ execute(inputs: SwiftlintInputs, _env: Record<string, string>, _config: CIConfig): Promise<StepDef>;
28
+ }
29
+ export interface DetektInputs {
30
+ /** Root directory of the Android project */
31
+ project_location?: string;
32
+ /** Module to run detekt on */
33
+ module?: string;
34
+ /** Report location pattern */
35
+ report_path_pattern?: string;
36
+ /** Additional Gradle arguments */
37
+ arguments?: string;
38
+ }
39
+ /**
40
+ * Runs detekt Kotlin static analysis via the Gradle detekt task.
41
+ */
42
+ export declare class DetektStepExecutor extends BaseStepExecutor {
43
+ getValidationRequirements(_inputs: DetektInputs, _env: Record<string, string>, _config: CIConfig): ValidationRequirement[];
44
+ getOutputs(): StepOutput[];
45
+ execute(inputs: DetektInputs, _env: Record<string, string>, _config: CIConfig): Promise<StepDef>;
46
+ }
47
+ //# sourceMappingURL=linting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linting.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/linting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMhF,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,yBAAyB,CACvB,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAM1B,UAAU,IAAI,UAAU,EAAE;IAOpB,OAAO,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CA0F1G;AAMD,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,yBAAyB,CACvB,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAI1B,UAAU,IAAI,UAAU,EAAE;IAIpB,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CAkDvG"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Linting steps: swiftlint, detekt
3
+ */
4
+ import { BaseStepExecutor } from './base.js';
5
+ /**
6
+ * Runs SwiftLint on the project with config and reporter options.
7
+ */
8
+ export class SwiftlintStepExecutor extends BaseStepExecutor {
9
+ getValidationRequirements(_inputs, _env, _config) {
10
+ return [
11
+ this.requireCommand('swiftlint', 'SwiftLint is required (brew install swiftlint)'),
12
+ ];
13
+ }
14
+ getOutputs() {
15
+ return [
16
+ { name: 'CIBUILD_SWIFTLINT_REPORT', type: 'environment', description: 'The generated SwiftLint report content' },
17
+ { name: 'CIBUILD_SWIFTLINT_REPORT_PATH', type: 'environment', description: 'Path to the generated SwiftLint report file' },
18
+ ];
19
+ }
20
+ async execute(inputs, _env, _config) {
21
+ const stepName = 'swiftlint';
22
+ const lintingPath = this.getInput(inputs, 'linting_path', '.');
23
+ const lintRange = this.getInput(inputs, 'lint_range', 'all');
24
+ const lintConfigFile = this.getInput(inputs, 'lint_config_file', '');
25
+ const reporter = this.getInput(inputs, 'reporter', 'xcode');
26
+ const strict = this.getInput(inputs, 'strict', 'no') === 'yes';
27
+ const quiet = this.getInput(inputs, 'quiet', 'no') === 'yes';
28
+ const commands = [];
29
+ commands.push('# swiftlint — lint Swift code');
30
+ commands.push('echo "🔍 Running SwiftLint..."');
31
+ commands.push('');
32
+ // Navigate to linting path
33
+ commands.push(`LINT_PATH='${this.escapeBash(lintingPath)}'`);
34
+ commands.push('cd "$LINT_PATH"');
35
+ commands.push('');
36
+ // Build swiftlint command
37
+ const flags = [];
38
+ if (lintConfigFile) {
39
+ flags.push(`--config '${this.escapeBash(lintConfigFile)}'`);
40
+ }
41
+ flags.push(`--reporter ${this.escapeBash(reporter)}`);
42
+ if (strict) {
43
+ flags.push('--strict');
44
+ }
45
+ if (quiet) {
46
+ flags.push('--quiet');
47
+ }
48
+ // Handle lint range
49
+ if (lintRange === 'changed') {
50
+ commands.push('# Lint only changed files');
51
+ commands.push('CHANGED_FILES=$(git diff --name-only --diff-filter=d HEAD | grep "\\.swift$" || true)');
52
+ commands.push('if [ -z "$CHANGED_FILES" ]; then');
53
+ commands.push(' echo "No changed Swift files to lint"');
54
+ commands.push(' exit 0');
55
+ commands.push('fi');
56
+ commands.push('');
57
+ }
58
+ // Determine report file extension
59
+ commands.push('# Determine report file name');
60
+ const extMap = {
61
+ json: 'json', html: 'html', junit: 'xml', csv: 'csv',
62
+ checkstyle: 'xml', sonarqube: 'json', markdown: 'md',
63
+ };
64
+ const reportExt = extMap[reporter] || 'txt';
65
+ commands.push(`REPORT_FILE="swiftlint_report.${reportExt}"`);
66
+ commands.push('REPORT_DIR="${CIBUILD_DEPLOY_DIR:-./artifacts}"');
67
+ commands.push('mkdir -p "$REPORT_DIR"');
68
+ commands.push('REPORT_PATH="$REPORT_DIR/$REPORT_FILE"');
69
+ commands.push('');
70
+ // Run swiftlint
71
+ const flagStr = flags.join(' ');
72
+ if (lintRange === 'changed') {
73
+ commands.push(`echo "$CHANGED_FILES" | while IFS= read -r file; do`);
74
+ commands.push(` swiftlint lint ${flagStr} --path "$file"`);
75
+ commands.push('done | tee "$REPORT_PATH"');
76
+ }
77
+ else {
78
+ commands.push(`swiftlint lint ${flagStr} | tee "$REPORT_PATH"`);
79
+ }
80
+ commands.push('LINT_EXIT=${PIPESTATUS[0]}');
81
+ commands.push('');
82
+ // Export outputs
83
+ commands.push('# Export report');
84
+ commands.push('REPORT_CONTENT=$(cat "$REPORT_PATH" 2>/dev/null || echo "")');
85
+ commands.push('envman add --key CIBUILD_SWIFTLINT_REPORT --value "$REPORT_CONTENT"');
86
+ commands.push('envman add --key CIBUILD_SWIFTLINT_REPORT_PATH --value "$REPORT_PATH"');
87
+ commands.push('');
88
+ commands.push('if [ "$LINT_EXIT" -ne 0 ]; then');
89
+ commands.push(' echo "⚠️ SwiftLint found issues (exit code: $LINT_EXIT)"');
90
+ commands.push(' exit "$LINT_EXIT"');
91
+ commands.push('fi');
92
+ commands.push('echo "✅ SwiftLint passed"');
93
+ const script = this.createBashScriptFromCommands(commands, stepName);
94
+ return this.createScriptStep(script, stepName);
95
+ }
96
+ }
97
+ /**
98
+ * Runs detekt Kotlin static analysis via the Gradle detekt task.
99
+ */
100
+ export class DetektStepExecutor extends BaseStepExecutor {
101
+ getValidationRequirements(_inputs, _env, _config) {
102
+ return [];
103
+ }
104
+ getOutputs() {
105
+ return [];
106
+ }
107
+ async execute(inputs, _env, _config) {
108
+ const stepName = 'detekt';
109
+ const projectLocation = this.getInput(inputs, 'project_location', '.');
110
+ const module = this.getInput(inputs, 'module', '');
111
+ const reportPathPattern = this.getInput(inputs, 'report_path_pattern', '*/build/reports/detekt/detekt*.html');
112
+ const extraArguments = this.getInput(inputs, 'arguments', '');
113
+ const commands = [];
114
+ commands.push('# detekt — Kotlin static analysis');
115
+ commands.push('echo "🔍 Running detekt..."');
116
+ commands.push('');
117
+ commands.push(`cd '${this.escapeBash(projectLocation)}'`);
118
+ commands.push('');
119
+ // Verify gradlew exists
120
+ commands.push('if [ ! -f "./gradlew" ]; then');
121
+ commands.push(' echo "❌ Error: gradlew not found in project directory"');
122
+ commands.push(' exit 1');
123
+ commands.push('fi');
124
+ commands.push('chmod +x ./gradlew');
125
+ commands.push('');
126
+ // Build detekt task name
127
+ let task = 'detekt';
128
+ if (module) {
129
+ task = `:${module}:detekt`;
130
+ }
131
+ const args = extraArguments ? ` ${extraArguments}` : '';
132
+ commands.push(`echo "Running: ./gradlew ${task}${args}"`);
133
+ commands.push(`./gradlew ${task}${args}`);
134
+ commands.push('');
135
+ // Show report location
136
+ commands.push('# Find report files');
137
+ commands.push(`REPORTS=$(find . -path '${this.escapeBash(reportPathPattern)}' 2>/dev/null || true)`);
138
+ commands.push('if [ -n "$REPORTS" ]; then');
139
+ commands.push(' echo "📄 Detekt reports:"');
140
+ commands.push(' echo "$REPORTS"');
141
+ commands.push('fi');
142
+ commands.push('');
143
+ commands.push('echo "✅ detekt analysis complete"');
144
+ const script = this.createBashScriptFromCommands(commands, stepName);
145
+ return this.createScriptStep(script, stepName);
146
+ }
147
+ }
148
+ //# sourceMappingURL=linting.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tests for Phase 2 steps: sign-apk, android-build-for-ui-testing,
3
+ * set-xcode-build-number, set-ios-version
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=phase2.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase2.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/phase2.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,197 @@
1
+ /**
2
+ * Tests for Phase 2 steps: sign-apk, android-build-for-ui-testing,
3
+ * set-xcode-build-number, set-ios-version
4
+ */
5
+ import { describe, test, expect } from '@jest/globals';
6
+ import { SignApkStepExecutor } from './android-sign.js';
7
+ import { AndroidBuildForUITestingStepExecutor } from './android.js';
8
+ import { SetXcodeBuildNumberStepExecutor, SetIosVersionStepExecutor } from './ios-version.js';
9
+ import { testConfig } from './test-config.js';
10
+ describe('SignApkStepExecutor', () => {
11
+ test('should generate signing script', async () => {
12
+ const executor = new SignApkStepExecutor();
13
+ const result = await executor.execute({}, {}, testConfig);
14
+ expect(result.kind).toBe('script');
15
+ expect(result.name).toBe('sign-apk');
16
+ expect(result.script).toContain('sign');
17
+ expect(result.script).toContain('KEYSTORE');
18
+ });
19
+ test('should support apksigner', async () => {
20
+ const executor = new SignApkStepExecutor();
21
+ const result = await executor.execute({ signer_tool: 'apksigner' }, {}, testConfig);
22
+ expect(result.script).toContain('apksigner');
23
+ });
24
+ test('should support jarsigner', async () => {
25
+ const executor = new SignApkStepExecutor();
26
+ const result = await executor.execute({ signer_tool: 'jarsigner' }, {}, testConfig);
27
+ expect(result.script).toContain('jarsigner');
28
+ });
29
+ test('should auto-detect signer tool by default', async () => {
30
+ const executor = new SignApkStepExecutor();
31
+ const result = await executor.execute({}, {}, testConfig);
32
+ expect(result.script).toContain('apksigner');
33
+ expect(result.script).toContain('jarsigner');
34
+ });
35
+ test('should support custom output name', async () => {
36
+ const executor = new SignApkStepExecutor();
37
+ const result = await executor.execute({ output_name: 'my-app-signed' }, {}, testConfig);
38
+ expect(result.script).toContain('my-app-signed');
39
+ });
40
+ test('should require keystore credentials', async () => {
41
+ const executor = new SignApkStepExecutor();
42
+ const result = await executor.execute({}, {}, testConfig);
43
+ expect(result.script).toContain('keystore_url, keystore_password, and keystore_alias are required');
44
+ });
45
+ test('should handle file:// keystore URLs', async () => {
46
+ const executor = new SignApkStepExecutor();
47
+ const result = await executor.execute({}, {}, testConfig);
48
+ expect(result.script).toContain('file://');
49
+ });
50
+ test('should export signed paths', async () => {
51
+ const executor = new SignApkStepExecutor();
52
+ const result = await executor.execute({}, {}, testConfig);
53
+ expect(result.script).toContain('CIBUILD_SIGNED_APK_PATH');
54
+ expect(result.script).toContain('CIBUILD_SIGNED_AAB_PATH');
55
+ });
56
+ test('should zipalign APKs', async () => {
57
+ const executor = new SignApkStepExecutor();
58
+ const result = await executor.execute({}, {}, testConfig);
59
+ expect(result.script).toContain('zipalign');
60
+ });
61
+ test('should declare outputs', () => {
62
+ const executor = new SignApkStepExecutor();
63
+ const outputs = executor.getOutputs();
64
+ expect(outputs).toHaveLength(2);
65
+ expect(outputs[0].name).toBe('CIBUILD_SIGNED_APK_PATH');
66
+ expect(outputs[1].name).toBe('CIBUILD_SIGNED_AAB_PATH');
67
+ });
68
+ });
69
+ describe('AndroidBuildForUITestingStepExecutor', () => {
70
+ test('should generate UI testing build script', async () => {
71
+ const executor = new AndroidBuildForUITestingStepExecutor();
72
+ const result = await executor.execute({}, {}, testConfig);
73
+ expect(result.kind).toBe('script');
74
+ expect(result.name).toBe('android-build-for-ui-testing');
75
+ expect(result.script).toContain('assemble');
76
+ expect(result.script).toContain('AndroidTest');
77
+ });
78
+ test('should build both app and test APKs', async () => {
79
+ const executor = new AndroidBuildForUITestingStepExecutor();
80
+ const result = await executor.execute({ module: 'app', variant: 'Debug' }, {}, testConfig);
81
+ expect(result.script).toContain(':app:assembleDebug');
82
+ expect(result.script).toContain(':app:assembleDebugAndroidTest');
83
+ });
84
+ test('should support custom module', async () => {
85
+ const executor = new AndroidBuildForUITestingStepExecutor();
86
+ const result = await executor.execute({ module: 'feature' }, {}, testConfig);
87
+ expect(result.script).toContain(':feature:');
88
+ });
89
+ test('should support custom variant', async () => {
90
+ const executor = new AndroidBuildForUITestingStepExecutor();
91
+ const result = await executor.execute({ variant: 'Release' }, {}, testConfig);
92
+ expect(result.script).toContain('assembleRelease');
93
+ expect(result.script).toContain('assembleReleaseAndroidTest');
94
+ });
95
+ test('should support extra arguments', async () => {
96
+ const executor = new AndroidBuildForUITestingStepExecutor();
97
+ const result = await executor.execute({ arguments: '--stacktrace' }, {}, testConfig);
98
+ expect(result.script).toContain('--stacktrace');
99
+ });
100
+ test('should export APK paths', async () => {
101
+ const executor = new AndroidBuildForUITestingStepExecutor();
102
+ const result = await executor.execute({}, {}, testConfig);
103
+ expect(result.script).toContain('CIBUILD_APK_PATH');
104
+ expect(result.script).toContain('CIBUILD_TEST_APK_PATH');
105
+ });
106
+ test('should declare outputs', () => {
107
+ const executor = new AndroidBuildForUITestingStepExecutor();
108
+ const outputs = executor.getOutputs();
109
+ expect(outputs).toHaveLength(2);
110
+ expect(outputs[0].name).toBe('CIBUILD_APK_PATH');
111
+ expect(outputs[1].name).toBe('CIBUILD_TEST_APK_PATH');
112
+ });
113
+ });
114
+ describe('SetXcodeBuildNumberStepExecutor', () => {
115
+ test('should generate build number script', async () => {
116
+ const executor = new SetXcodeBuildNumberStepExecutor();
117
+ const result = await executor.execute({}, {}, testConfig);
118
+ expect(result.kind).toBe('script');
119
+ expect(result.name).toBe('set-xcode-build-number');
120
+ expect(result.script).toContain('agvtool');
121
+ });
122
+ test('should support build version offset', async () => {
123
+ const executor = new SetXcodeBuildNumberStepExecutor();
124
+ const result = await executor.execute({ build_version: '100', build_version_offset: '5' }, {}, testConfig);
125
+ expect(result.script).toContain('OFFSET');
126
+ expect(result.script).toContain('5');
127
+ });
128
+ test('should support marketing version', async () => {
129
+ const executor = new SetXcodeBuildNumberStepExecutor();
130
+ const result = await executor.execute({ build_short_version_string: '2.1.0' }, {}, testConfig);
131
+ expect(result.script).toContain('new-marketing-version');
132
+ expect(result.script).toContain('2.1.0');
133
+ });
134
+ test('should fall back to PlistBuddy', async () => {
135
+ const executor = new SetXcodeBuildNumberStepExecutor();
136
+ const result = await executor.execute({}, {}, testConfig);
137
+ expect(result.script).toContain('PlistBuddy');
138
+ expect(result.script).toContain('CFBundleVersion');
139
+ });
140
+ test('should export CIBUILD_BUNDLE_VERSION', async () => {
141
+ const executor = new SetXcodeBuildNumberStepExecutor();
142
+ const result = await executor.execute({}, {}, testConfig);
143
+ expect(result.script).toContain('CIBUILD_BUNDLE_VERSION');
144
+ });
145
+ test('should declare outputs', () => {
146
+ const executor = new SetXcodeBuildNumberStepExecutor();
147
+ const outputs = executor.getOutputs();
148
+ expect(outputs).toHaveLength(1);
149
+ expect(outputs[0].name).toBe('CIBUILD_BUNDLE_VERSION');
150
+ });
151
+ });
152
+ describe('SetIosVersionStepExecutor', () => {
153
+ test('should generate version script', async () => {
154
+ const executor = new SetIosVersionStepExecutor();
155
+ const result = await executor.execute({ info_plist_file: 'MyApp/Info.plist' }, {}, testConfig);
156
+ expect(result.kind).toBe('script');
157
+ expect(result.name).toBe('set-ios-version');
158
+ expect(result.script).toContain('PlistBuddy');
159
+ expect(result.script).toContain('MyApp/Info.plist');
160
+ });
161
+ test('should require info_plist_file', async () => {
162
+ const executor = new SetIosVersionStepExecutor();
163
+ await expect(executor.execute({}, {}, testConfig)).rejects.toThrow("Missing required input 'info_plist_file'");
164
+ });
165
+ test('should set CFBundleVersion', async () => {
166
+ const executor = new SetIosVersionStepExecutor();
167
+ const result = await executor.execute({ info_plist_file: 'Info.plist', bundle_version: '42' }, {}, testConfig);
168
+ expect(result.script).toContain('CFBundleVersion');
169
+ expect(result.script).toContain('42');
170
+ });
171
+ test('should set CFBundleShortVersionString', async () => {
172
+ const executor = new SetIosVersionStepExecutor();
173
+ const result = await executor.execute({ info_plist_file: 'Info.plist', bundle_version_short: '1.2.0' }, {}, testConfig);
174
+ expect(result.script).toContain('CFBundleShortVersionString');
175
+ expect(result.script).toContain('1.2.0');
176
+ });
177
+ test('should export version env vars', async () => {
178
+ const executor = new SetIosVersionStepExecutor();
179
+ const result = await executor.execute({ info_plist_file: 'Info.plist' }, {}, testConfig);
180
+ expect(result.script).toContain('CIBUILD_APP_VERSION');
181
+ expect(result.script).toContain('CIBUILD_APP_BUILD');
182
+ });
183
+ test('should check Info.plist exists', async () => {
184
+ const executor = new SetIosVersionStepExecutor();
185
+ const result = await executor.execute({ info_plist_file: 'Info.plist' }, {}, testConfig);
186
+ expect(result.script).toContain('Info.plist not found');
187
+ expect(result.script).toContain('exit 1');
188
+ });
189
+ test('should declare outputs', () => {
190
+ const executor = new SetIosVersionStepExecutor();
191
+ const outputs = executor.getOutputs();
192
+ expect(outputs).toHaveLength(2);
193
+ expect(outputs[0].name).toBe('CIBUILD_APP_VERSION');
194
+ expect(outputs[1].name).toBe('CIBUILD_APP_BUILD');
195
+ });
196
+ });
197
+ //# sourceMappingURL=phase2.test.js.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for Phase 3 steps: certificate-installer, fastlane
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=phase3.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase3.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/phase3.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}