Skip to content

Commit 2424d6c

Browse files
committed
🔧 generating build numbers
1 parent 6be1df1 commit 2424d6c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

LocalizationEditor.xcodeproj/project.pbxproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
isa = PBXNativeTarget;
277277
buildConfigurationList = F3D9C95220BEC7460081830A /* Build configuration list for PBXNativeTarget "LocalizationEditor" */;
278278
buildPhases = (
279+
F3EF22082209F25F000E8C80 /* Build number */,
279280
F3BC11A421C40FAC001F396F /* SwiftLint */,
280281
F3D9C93E20BEC7460081830A /* Sources */,
281282
F3D9C93F20BEC7460081830A /* Frameworks */,
@@ -398,6 +399,24 @@
398399
shellPath = /bin/sh;
399400
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
400401
};
402+
F3EF22082209F25F000E8C80 /* Build number */ = {
403+
isa = PBXShellScriptBuildPhase;
404+
buildActionMask = 2147483647;
405+
files = (
406+
);
407+
inputFileListPaths = (
408+
);
409+
inputPaths = (
410+
);
411+
name = "Build number";
412+
outputFileListPaths = (
413+
);
414+
outputPaths = (
415+
);
416+
runOnlyForDeploymentPostprocessing = 0;
417+
shellPath = /bin/sh;
418+
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\nbuildNumber=$(git rev-list HEAD | wc -l | tr -d ' ')\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\"\nfi\n";
419+
};
401420
/* End PBXShellScriptBuildPhase section */
402421

403422
/* Begin PBXSourcesBuildPhase section */

0 commit comments

Comments
 (0)