|
1 | 1 | # Versioning the App |
2 | 2 |
|
3 | | -Versioning the app needs to be a manual step. Follow the instructions below to update the versions |
| 3 | +Versioning the app will be done with [npm-version](https://docs.npmjs.com/cli/v6/commands/npm-version). Please follow the instructions to |
| 4 | +create a proper update and run the command |
4 | 5 |
|
5 | | -## Table of contents |
6 | | -1. [Versioning project](#versioning-project) |
7 | | -1. [Versioning iOS](#versioning-ios) |
8 | | -1. [Versioning Android](#versioning-android) |
9 | | -1. [When done](#when-done) |
| 6 | + yarn version patch | minor | major |
| 7 | + |
| 8 | +It will then automatically update Git, see [this](https://github.com/saucelabs/sample-app-mobile/commit/f61d8fec2b17b233d0abd8444fe0f0dc86a1d7db) commit for an example. |
10 | 9 |
|
11 | | -## Versioning project |
12 | | -Open the `package.json` and update the version to the version you need, try to use [SEMVER](https://nodesource.com/blog/semver-a-primer/), meaning using this |
| 10 | +Then: |
13 | 11 |
|
14 | | - x.y.z |
15 | | - |
16 | | -- `x`: This is a `MAJOR` release, there are for example breaking changes |
17 | | -- `y`: This is a `MINOR` release and can hold for example new features |
18 | | -- `z`: This is a `PATCH` release which holds fixes |
19 | | - |
20 | | - |
21 | | -## Versioning iOS |
22 | | -Open the following file [`ios/SwagLabsMobileApp/Info.plist`](../ios/SwagLabsMobileApp/Info.plist) and change this code |
23 | | - |
24 | | -``` |
25 | | -<key>CFBundleShortVersionString</key> |
26 | | -<string>1.0.0</string> |
27 | | -<key>CFBundleSignature</key> |
28 | | -<string>????</string> |
29 | | -<key>CFBundleVersion</key> |
30 | | -<string>1</string> |
31 | | -``` |
32 | | - |
33 | | -To this |
34 | | - |
35 | | -``` |
36 | | -<key>CFBundleShortVersionString</key> |
37 | | -<string>x.y.z</string> |
38 | | -<key>CFBundleSignature</key> |
39 | | -<string>????</string> |
40 | | -<key>CFBundleVersion</key> |
41 | | -<string>{current value + 1}</string> |
42 | | -``` |
43 | | - |
44 | | -Open the following file [`ios/SwagLabsMobileApp.xcodeproj/project.pbxproj`](../ios/SwagLabsMobileApp.xcodeproj/project.pbxproj) |
45 | | -and change all `CURRENT_PROJECT_VERSION = 1;` to `CURRENT_PROJECT_VERSION = {current value + 1};` |
46 | | - |
47 | | -## Versioning Android |
48 | | -Open the following file [`android/app/build.gradle`](../android/app/build.gradle) and change this code |
49 | | - |
50 | | -``` |
51 | | -versionCode 1 |
52 | | -versionName "1.0.0" |
53 | | -``` |
54 | | - |
55 | | -to |
56 | | - |
57 | | -``` |
58 | | -versionCode {current value + 1} |
59 | | -versionName "x.y.z" |
60 | | -``` |
61 | | - |
62 | | -## When done |
63 | | -When all changes are executed create a feature branch and a PR |
| 12 | +- build the apps |
| 13 | +- create a new release on Git |
| 14 | +- upload the apps to Git |
0 commit comments