Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix: remove gogio from android docker image
Browse files Browse the repository at this point in the history
this fixes an issue where if go.mod has an override for gioui.org, it is
out of sync with the docker image's gogio.
  • Loading branch information
mixmasala committed Mar 8, 2022
1 parent c8ef0b4 commit 58083d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Build catchat apk
run: |
docker run -v "$(pwd)":/go/build/ katzenpost/android_build gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey reproducible.keystore -signpass reproducible .
docker run -v "$(pwd)":/go/build/ katzenpost/android_build bash -c "go get -v gioui.org/cmd/gogio && gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey reproducible.keystore -signpass reproducible ."
- name: Upload binary artifact
uses: actions/upload-artifact@v2
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,5 @@ RUN yes | sdkmanager --licenses \
#&& yes | sdkmanager "ndk-bundle" \
&& yes | sdkmanager "platforms;${ANDROID_ABI}"

# install gogio
# XXX: verify that this command uses pinned version in go.mod
RUN go get -v gioui.org/cmd/gogio

# Set the working directory for the container
WORKDIR /go/build
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ See the Dockerfile.android in this repository to set up a build environment if y

First, get and install the gogio tool:

go get -v gioui.org/cmd/gogio@4b377aa896373062db0f9d289d0111a29e8fa4b0
go get -v gioui.org/cmd/gogio

Generate an Android signing key so you can update your app later:
(keytool is provided by the openjdk package: apt install openjdk-11-jdk, or use within the docker container)
Expand All @@ -109,7 +109,7 @@ changes to test on android. Do not forget to update or remove the vendor path.

To run the build, execute the following command while in this project root:

docker run -v "$(pwd)":/go/build/ katzenpost/android_build gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey sign.keystore -signpass YOURPASSWORD .
docker run -v "$(pwd)":/go/build/ katzenpost/android_build bash -c "go get -v gioui.org/cmd/gogio && gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey sign.keystore -signpass YOURPASSWORD ."

Note that the contents of the local directory are copied into the docker environment - so your signing keystore ought to be in this path as well.

Expand All @@ -123,7 +123,7 @@ Between versions you might need to install uninstall a previous build

#### Verify build: To verify that your local build matches the CI-built apk, use the included reproducible.keystore to sign the apk:

docker run --rm -v "$(pwd)":/go/build/ katzenpost/android_build gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey reproducible.keystore -signpass reproducible .
docker run --rm -v "$(pwd)":/go/build/ katzenpost/android_build bash -c "go get -v gioui.org/cmd/gogio && gogio -arch arm64,amd64 -x -target android -appid org.mixnetworks.catchat -version 1 -signkey reproducible.keystore -signpass reproducible ."

## Run it

Expand Down

0 comments on commit 58083d0

Please sign in to comment.