-
Notifications
You must be signed in to change notification settings - Fork 10
/
step.yml
129 lines (102 loc) · 4.78 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
title: Set Xcode Project Build Number
summary: |-
Set the value of your iOS app's build number to the specified version number.
description: |-
Set the value of your iOS app's build number to the specified version number. A great way to keep track of versions
when submitting bug reports.
If your IPA contains multiple build targets, they need to have the same version number as your app's main target has.
In that case, you need to add this Step to your Workflow for each build target: if you have, say, three targets, you need to have three instances of this Step in your Workflow.
If there are targets with different version numbers the app cannot be submitted for App Review or Beta App Review.
### Configuring the Step
The step can handle if versions numbers are specified in the project file (default configuration since Xcode 13) and the old style
where the version numbers appear in the **Info.plist** file. It can automatically detect which style is used and act accordingly.
For the simple projects you do not need to do anything because the step uses the previously defined $BITRISE_PROJECT_PATH
and $BITRISE_SCHEME env vars to detect the target settings.
For better customisation the step can be also instructed to look for a specific target and even for specific target configurations
to update the version numbers.
### Useful links
- [Build numbering and app versioning](https://devcenter.bitrise.io/builds/build-numbering-and-app-versioning/#setting-the-cfbundleversion-and-cfbundleshortversionstring-of-an-ios-app)
- [Current Project Version in Apple documentation](https://developer.apple.com/documentation/xcode/build-settings-reference#Current-Project-Version)
- [Marketing Version in Apple documentation](https://developer.apple.com/documentation/xcode/build-settings-reference#Marketing-Version)
- [CFBundleversion in Apple documentation](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion)
### Related Steps
- [Xcode Archive & Export for iOS](https://www.bitrise.io/integrations/steps/xcode-archive)
- [Set Android Manifest Version Code and Name](https://www.bitrise.io/integrations/steps/set-android-manifest-versions)
website: https://github.com/bitrise-steplib/steps-set-xcode-build-number
source_code_url: https://github.com/bitrise-steplib/steps-set-xcode-build-number
support_url: https://github.com/bitrise-steplib/steps-set-xcode-build-number/issues
type_tags:
- utility
project_type_tags:
- ios
- macos
- react-native
- flutter
- cordova
- ionic
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-set-xcode-build-number
run_if: .IsCI
inputs:
- project_path: $BITRISE_PROJECT_PATH
opts:
title: Project path
summary: Xcode Project (`.xcodeproj`) or Workspace (`.xcworkspace`) path
description: |-
Xcode Project (`.xcodeproj`) or Workspace (`.xcworkspace`) path.
is_required: true
- scheme: $BITRISE_SCHEME
opts:
title: Scheme
summary: Xcode Scheme name.
description: |-
Xcode Scheme name.
is_required: true
- target:
opts:
title: Target
summary: Xcode Target name.
description: |-
Xcode Target name.
It is optional and if specified then the step will find the given target and update the version numbers for it.
If it is left empty then the step will use the scheme's default target to update the version numbers.
- configuration:
opts:
title: Configuration
summary: Xcode Configuration name.
description: |-
Xcode Configuration name.
It is optional and if specified then the step will only update the configuration with the given name.
If it is left empty then the step will update all of the target's configurations with the build and version number.
- build_version: $BITRISE_BUILD_NUMBER
opts:
title: Build Number
description: |-
This will be either the CFBundleVersion in the Info.plist file or the CURRENT_PROJECT_VERSION in the project file.
is_required: true
- build_version_offset:
opts:
title: Build Number Offset
description: |-
This offset will be added to `build_version` input's value. It must be a positive number.
- build_short_version_string:
opts:
title: Version Number
description: |-
This will be either the CFBundleShortVersionString in the Info.plist file or the MARKETING_VERSION in the project file.
If it is empty then the step will not modify the existing value.
- verbose: "false"
opts:
category: Debug
title: Enable verbose logging
summary: Enable logging additional information for debugging.
is_required: true
value_options:
- "true"
- "false"
outputs:
- XCODE_BUNDLE_VERSION:
opts:
title: Xcode Bundle Version
description: The bundle version used in either in Info.plist or project file