Conversation
…This file will be moved to a different repo in the future
|
|
||
| import_from_git( | ||
| url: "https://github.com/RevenueCat/purchases-ios.git", | ||
| branch: "csdk-27", |
There was a problem hiding this comment.
This needs to be updated. Once the common fastfile has been extracted to its own repo, I will do so.
There was a problem hiding this comment.
When you create a new repo, here's a quick guide for SOC-2 compliance https://www.notion.so/revenuecat/Making-repositories-SOC-2-compliant-122f48c59e41455aa85ad11fcc343ace
| new_version = options[:version] | ||
| fail ArgumentError, "missing version" unless new_version | ||
| previous_version = android_get_version_name(gradle_file: gradle_file_path) | ||
| android_set_version_name(version_name: new_version, gradle_file: gradle_file_path) |
There was a problem hiding this comment.
These functions came from a fastlane plugin. While this is probably more robust, I changed it to update the version number using the existing "manual" approach where we check for all occurrences of the previous version number and change them with the new one.
| end | ||
|
|
||
| desc "Tag release version with latest if necessary" | ||
| lane :tag_release_with_latest_if_needed do |options| |
There was a problem hiding this comment.
I removed this lane entirely, and I think we can probably remove the latest tag at some point. Unless anyone knows if we are using it for anything. We were not doing this on the iOS SDK, and to keep parity with the automation, I didn't add it, but I can add it to both if we think it's necessary, or only to android
| # Available Actions | ||
|
|
||
| ## Android | ||
| ### bump |
There was a problem hiding this comment.
These are all the lanes imported from the CommonFastfile.
| GITHUB_PULL_REQUEST_TEAM_REVIEWERS= | ||
|
|
||
| # Needed for access to changelog and other git operations | ||
| GITHUB_TOKEN= |
There was a problem hiding this comment.
Honestly, we can use the same token here and the PR API token. I kept them separate since GITHUB_PULL_REQUEST_API_TOKEN is used by fastlane internally to create the PRs, while GITHUB_TOKEN is used on our side.
There was a problem hiding this comment.
maybe we can add a comment here to suggest that? i.e.:
# Needed for access to changelog and other git operations
# It can be the same value as GITHUB_PULL_REQUEST_API_TOKEN| @@ -0,0 +1 @@ | |||
| 5.2.0-SNAPSHOT | |||
There was a problem hiding this comment.
This technique was used in iOS and I thought it would be good to port to all our SDKs. Basically, a .version file in the root folder will always contain the current version. We can use that to substitute this string on all the files that contain the old version number with the new one. Since each platform has its own versioning system, this is a way to abstract that. Lmk if you have any concerns.
| [bundle exec] fastlane bump | ||
| ``` | ||
|
|
||
| Bump version, edit changelog, and create pull request |
There was a problem hiding this comment.
Note that this now does much more than before. Besides asking devs for a version number and updating that version number in the necessary places, this will also prompt devs to edit the CHANGELOG as part of the process, will create a release branch, commit changes, push it and create a PR. ❤️ automation!
|
Other than updating the repo and branch from where to pull the common fastfile, this should be good for review. |
| @@ -0,0 +1 @@ | |||
| 5.2.0-SNAPSHOT | |||
| 1. Create a `fastlane/.env` file with your GitHub API token (see `fastlane/.env.SAMPLE`). This will be used to create the PR, so you should use your own token so the PR gets assigned to you. | ||
| 2. Run `bundle exec fastlane bump` | ||
| 1. Input new version number | ||
| 2. Update CHANGELOG.latest.md to include the latest changes. Call out API changes (if any). You can use the existing CHANGELOG.md as a base for formatting. To compile the changelog, you can compare the changes between the base branch for the release (usually main) against the latest release, by checking https://github.com/revenuecat/purchases-android/compare/<latest_release>...<base_branch>. For example, https://github.com/revenuecat/purchases-android/compare/5.1.1...main. |
There was a problem hiding this comment.
looking forward to this being done automatically
| GITHUB_PULL_REQUEST_TEAM_REVIEWERS= | ||
|
|
||
| # Needed for access to changelog and other git operations | ||
| GITHUB_TOKEN= |
There was a problem hiding this comment.
maybe we can add a comment here to suggest that? i.e.:
# Needed for access to changelog and other git operations
# It can be the same value as GITHUB_PULL_REQUEST_API_TOKEN|
|
||
| import_from_git( | ||
| url: "https://github.com/RevenueCat/purchases-ios.git", | ||
| branch: "csdk-27", |
There was a problem hiding this comment.
When you create a new repo, here's a quick guide for SOC-2 compliance https://www.notion.so/revenuecat/Making-repositories-SOC-2-compliant-122f48c59e41455aa85ad11fcc343ace
| ENV["REPO_NAME"] = "purchases-android" | ||
| ENV["FILES_TO_UPDATE_VERSION_STRING"] = " | ||
| ../library.gradle, | ||
| ../common/src/main/java/com/revenuecat/purchases/common/Config.kt, | ||
| ../.circleci/config.yml, | ||
| ../.version, | ||
| ../docs/index.html, | ||
| ../gradle.properties | ||
| " |
|
I'm closing this one in favor of #557 |
Description
https://revenuecats.atlassian.net/browse/CSDK-27
On this PR we change to use a common
Fastfilewith common automation that can be shared between our different SDKs. The current sharedFastfilelives onpurchases-iosbut I plan to extract it to a shared repo before merging this. I recommend reviewing that file as well in https://github.com/RevenueCat/purchases-ios/blob/csdk-27/fastlane/CommonFastfile or https://github.com/RevenueCat/purchases-ios/pull/1719/files#diff-e7a6ebeea31beaa1c5c15ea846d78d7902efbebd98655e084bf863a2712a489fAlso note that a release PR was created by using the
bumplane here: #549TODO