-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release automation #932
Release automation #932
Conversation
print("❌ Error(s) occurred, please check the log") | ||
exit(1) | ||
else: | ||
print("Done!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmartinesp if you want to test the script, you can run it, and ensure to answer no each time the script is asking to push the branch. At the end you can reset For the GH artifact, when it will be asked, you can use the one from this action run: https://github.com/vector-im/element-x-android/suites/14436763171/artifacts/814828102 since the GH action will not be triggered (since you will not push Let me know if you have any question! |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #932 +/- ##
========================================
Coverage 56.59% 56.59%
========================================
Files 968 968
Lines 24570 24570
Branches 4987 4987
========================================
Hits 13905 13905
Misses 8456 8456
Partials 2209 2209 ☔ View full report in Codecov by Sentry. |
|
||
printf "\n================================================================================\n" | ||
printf "Building the bundle locally first...\n" | ||
./gradlew clean bundleRelease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting OOM errors while building. Maybe we should bump the heap size, either globally or just for this command? Also, the result of this step is not checked before continuing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting OOM errors while building
I probably have a local config somewhere which avoid that. The idea of this line is to detect in advance if the CI will fail. I will see how to fix this issue, but since I do not encounter it, maybe you can propose a fix?
the result of this step is not checked before continuing
Any failure should break the script now (there is no set +e
statement), so I think it's fine, but I can double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can propose a fix?
The CI is actually using 3GB of RAM (-Xmx3072m
) while we're using 2GB locally (-Xmx2048m
), so we could increase that. It would also be great if we could override this value locally, but I couldn't find an easy way to do it when I last checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried again and it built fine using just the default 2GB now. Then I decreased to 1GB to force an OOM error and the script continues after gradle fails:
* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
> java.lang.OutOfMemoryError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 37s
1868 actionable tasks: 552 executed, 1039 from cache, 277 up-to-date
================================================================================
Running towncrier...
Loading template...
Finding news fragments...
Rendering news fragments...
Writing to newsfile...
Staging newsfile...
Removing news fragments...
I want to remove the following files:
Is it okay if I remove those files? [Y/n]: Done!
================================================================================
Check the file CHANGES.md consistency. It's possible to reorder items (most important changes first) or change their section if relevant. Also an opportunity to fix some typo, or rewrite things. Do not commit your change. Press enter when it's done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works well overall, but I had to run it several times to get to the end of the process because there are a few minor issues.
…dalone) and do not use `-t` which does not seem to be standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I don't think the issue about the script continuing when gradle fails is a blocker at this point, since it's easy to spot and react.
Also, we might want to add some docs about using |
Since the repo is not maintained anymore, I am now using I have update the script consequently and it's working fine on my side. |
Kudos, SonarCloud Quality Gate passed! |
This PR adds a release script to the project.
The script is inspired from what we have on Element Android, and adapted, now that we are using app bundles.
The CI (GutHub action) is still building the bundle, and this is the longest part of the process. For the rest, it's quite straight forward and took only a few minutes to run the script (when there is no error).
Note: I had to split the version computation in
Versions.kt
, for simplification. VersionCode and VersionName was not matching.