From d55773ced406c02af01d2b61f17d7de47c90156b Mon Sep 17 00:00:00 2001 From: Oscar Mira Date: Sun, 4 Aug 2024 16:49:57 +0200 Subject: [PATCH] Migrate to new docker compose syntax --- .github/workflows/release.yml | 6 +++--- .github/workflows/reprocheck.yml | 4 ++-- BUILDING.md | 6 +++--- reproducible-builds/README.md | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0677bd6cf8..5b98dcb831 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: cache: gradle - name: Set up builder image - run: docker-compose build + run: docker compose build working-directory: reproducible-builds - name: Export CI environment variables @@ -72,12 +72,12 @@ jobs: - name: Build without signing if: "env.HAVE_KEYSTORE == 'false'" - run: docker-compose run -v "$HOME/.gradle/caches:/.gradle-ro-cache:ro" assemble + run: docker compose run -v "$HOME/.gradle/caches:/.gradle-ro-cache:ro" assemble working-directory: reproducible-builds - name: Build and sign if: "env.HAVE_KEYSTORE == 'true'" - run: docker-compose run -v "$HOME/.gradle/caches:/.gradle-ro-cache:ro" assemble + run: docker compose run -v "$HOME/.gradle/caches:/.gradle-ro-cache:ro" assemble working-directory: reproducible-builds env: CI_KEYSTORE_PATH: certs/keystore.jks diff --git a/.github/workflows/reprocheck.yml b/.github/workflows/reprocheck.yml index f800b96fe9..9139b71417 100644 --- a/.github/workflows/reprocheck.yml +++ b/.github/workflows/reprocheck.yml @@ -31,7 +31,7 @@ jobs: ref: "${{ env.TAG_REF }}" - name: Set up builder image - run: docker-compose build + run: docker compose build working-directory: reproducible-builds - name: Export CI environment variables @@ -55,7 +55,7 @@ jobs: MAPS_API_KEY: ${{ vars.CI_MAPS_API_KEY }} - name: Build release - run: docker-compose run assemble + run: docker compose run assemble working-directory: reproducible-builds - uses: actions/upload-artifact@v4 diff --git a/BUILDING.md b/BUILDING.md index 1a4a2c6080..c8e7e63ab8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -54,7 +54,7 @@ You can build Molly using GitHub Actions, either with GitHub-hosted public runne ## Building Using the CLI -If you prefer building Molly locally on your computer, you can follow these steps, which are essentially the same procedure as in the [Reproducible Build guide](reproducible-builds/README.md). You have the option to customize the build by exporting environment variables or saving them in a `.env` file before running `docker-compose`. +If you prefer building Molly locally on your computer, you can follow these steps, which are essentially the same procedure as in the [Reproducible Build guide](reproducible-builds/README.md). You have the option to customize the build by exporting environment variables or saving them in a `.env` file before running `docker compose`. ### Steps @@ -76,14 +76,14 @@ export CI_APP_TITLE="Molly" export CI_PACKAGE_ID="im.molly.app" # Build the APK using Docker environment -docker-compose up --build +docker compose up --build # Optionally, save environment variables in a .env file for future builds echo "CI_APP_TITLE=Molly" >> .env echo "CI_PACKAGE_ID=im.molly.app" >> .env # Shut down the Docker environment after use -docker-compose down +docker compose down ``` The built APKs will be available in the `output/apk` directory. Make sure to [sign the APKs](#signing-the-apks) before installation. diff --git a/reproducible-builds/README.md b/reproducible-builds/README.md index e94fcf21b7..a62156dfd1 100644 --- a/reproducible-builds/README.md +++ b/reproducible-builds/README.md @@ -33,7 +33,7 @@ git checkout $VERSION # Before proceeding, you should open this tutorial (README.md file) and review the instructions. # Build the APK using the Docker environment -docker-compose up --build +docker compose up --build # Download the official APK wget https://github.com/mollyim/mollyim-android/releases/download/$VERSION/Molly-$VERSION.apk @@ -48,7 +48,7 @@ python apkdiff/apkdiff.py Molly-$VERSION.apk outputs/apk/prodGmsWebsite/release/ python apkdiff/apkdiff.py Molly-$VERSION-FOSS.apk outputs/apk/prodFossWebsite/release/Molly-unsigned-$VERSION-FOSS.apk # Clean up the Docker environment -docker-compose down +docker compose down ``` If you get `APKs match`, you have **successfully verified** that the official release matches with your own self-built version of Molly. Congratulations!