diff --git a/doc/FDROID.md b/doc/FDROID.md index af09b8bd7c..0d2835f180 100644 --- a/doc/FDROID.md +++ b/doc/FDROID.md @@ -17,31 +17,27 @@ You can find our configuration file at [`metadata/im.status.ethereum.yml`](https The file defines all the necessary metadata like `SourceCode`, `Website`, or `License`, but the most important key is `Builds`, which looks like this: ```yml Builds: - - versionName: 1.4.1 - versionCode: 2020070112 + - versionName: 1.12.0 + versionCode: 2021022512 commit: cfb825a11b61d312af8cb5d36686af540c31f481 - sudo: - - mkdir -m 0755 /nix - - chown vagrant /nix - init: ./nix/scripts/setup.sh - output: ./result/app-release-unsigned.apk - scanignore: - - android/build.gradle - scandelete: - - ios - build: make release-android BUILD_TYPE=release BUILD_NUMBER=2020070112 ANDROID_APK_SIGNED=false + sudo: make fdroid-nix-dir + init: nix/scripts/setup.sh + output: result/app-release-unsigned.apk + scanignore: android/build.gradle + scandelete: ios + build: make release-fdroid BUILD_NUMBER=$$VERCODE$$ ``` It contains a list of objects defining each release of the application. In order to add a new release simply copy a previous release object and adjust the following values: -* `versionName` - String version like `1.4.1` -* `versionCode` - Android `versionCode`. We use a timestamp generated by [a script](../scripts/version/gen_build_no.sh) -* `commit` - Specific commit SHA1 from which the given release was built -* `BUILD_NUMBER` in `build` step - Same value as `versionCode` +* `versionName` - String version like `1.12.0`. +* `versionCode` - Android `versionCode`. We use a timestamp generated by [a script](../scripts/version/gen_build_no.sh). +* `commit` - Specific commit SHA1 from which the given release was built. -The `versionCode` should be the same as the one in build that was uplodade to Play Store. It can be found in the build logs or by using: +The `versionCode` should be the same as the one in build that was uplodade to Play Store. +It can be found in the build logs or by using: ``` - > apkanalyzer manifest version-code StatusIm-v1.4.1.apk -2020070112 + > apkanalyzer manifest version-code StatusIm-Mobile-v1.12.0.apk +2021022512 ``` At the bottom of the file you should also update the following keys: @@ -71,19 +67,21 @@ Build it using: ``` docker build --build-arg=BUILDER_UID=$UID -t statusteam/docker-executable-fdroidserver:latest . ``` -Then clone the [fdroiddata](https://gitlab.com/fdroid/fdroiddata) and [fdroidserver](https://gitlab.com/fdroid/fdroidserver) repos and use it to test the build of a specific Status Android app version: `1.4.1` +Then clone the [fdroiddata](https://gitlab.com/fdroid/fdroiddata) and [fdroidserver](https://gitlab.com/fdroid/fdroidserver) repos and use it to test the build of a specific Status Android app version: `1.12.0` ``` +git clone https://gitlab.com/fdroid/fdroidserver +git clone https://gitlab.com/fdroid/fdroiddata docker run --rm \ - -u $UID:$GID \ - -v $(pwd)/nix:/nix \ - -v $(pwd)/fdroiddata:/repo \ - -v $(pwd)/fdroidserver:/fdroidserver \ + -u $UID:$GID -e USER=vagrant \ + -v $PWD/fdroiddata:/repo \ + -v $PWD/fdroidserver:/fdroidserver \ statusteam/docker-executable-fdroidserver:latest \ - build im.status.ethereum:1.4.1 + build im.status.ethereum:1.12.0 ``` We have to create a user and specify the UID because Nix cannot run as `root` and that is the default user for the F-Droid Docker image. By adding our own user and setting the UID we also make it possible to mount folders like `fdroiddata` and `fdroidserver`. You can specify a `--vebose` flag for `build` command for additional information. +You can provide `--storage-opt size=30G` flag if Docker complains about running out of space. You should also run `lint im.status.ethereum` to verify the YAML format is correct. @@ -91,4 +89,6 @@ You should also run `lint im.status.ethereum` to verify the YAML format is corre The original research was done in [#8512](https://github.com/status-im/status-react/issues/8512). -Normally F-Droid server wants to run Gradle itself, but we do not specify the `gradle` key in order to run `make release-android` ourselves in `build` step. +Normally F-Droid server wants to run Gradle itself, but we do not specify the `gradle` key in order to run `make release-fdroid` ourselves in `build` step. We also add `android/build.gradle` to `scanignore` to avoid F-Droid trying to use Gradle directly. + +Once the PR is merged it may take a few days for the F-Droid server farm to build and deploy the new version to their site and app. You can look up the current state of builds [here](https://f-droid.org/wiki/index.php?title=Special:RecentChanges&days=7&from=&hidebots=0&hideanons=1&hideliu=1&limit=500) and look for your App ID and a `deploy` change after it.