Skip to content

Commit

Permalink
Increment build numbers for supported platforms when generating versi…
Browse files Browse the repository at this point in the history
…on string, closes #71
  • Loading branch information
robinnorth committed Apr 29, 2021
1 parent a21505c commit 05e994d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Increment build numbers for supported platforms when generating version string. [Issue #71](https://github.com/superunitybuild/buildtool/issues/71)
- Allow BuildActions to draw custom serialized property fields

### Changed
Expand Down
5 changes: 5 additions & 0 deletions Editor/Build/BuildProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ public static string GenerateVersionString(ProductParameters productParameters,
productParameters.lastGeneratedVersion = retVal;
PlayerSettings.bundleVersion = retVal;

// Increment build numbers for supported platforms
PlayerSettings.Android.bundleVersionCode = PlayerSettings.Android.bundleVersionCode + 1;
PlayerSettings.iOS.buildNumber = $"{int.Parse(PlayerSettings.iOS.buildNumber) + 1}";
PlayerSettings.macOS.buildNumber = $"{int.Parse(PlayerSettings.macOS.buildNumber) + 1}";

return retVal;
}

Expand Down

0 comments on commit 05e994d

Please sign in to comment.