mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-10 06:15:17 +00:00
Each build command via Docker for Linux builds creates a separate writable layer from scratch, so anything shared between commands needs to persist on the host. This adds the container's GPG keys, so that the riot-web GPG key can be imported in one step and verified in the next. Fixes https://github.com/vector-im/riot-web/issues/13545
20 lines
761 B
Bash
Executable file
20 lines
761 B
Bash
Executable file
#!/bin/bash
|
|
|
|
docker inspect riot-desktop-dockerbuild 2> /dev/null > /dev/null
|
|
if [ $? != 0 ]; then
|
|
echo "Docker image riot-desktop-dockerbuild not found. Have you run yarn run docker:setup?"
|
|
exit 1
|
|
fi
|
|
|
|
# Taken from https://www.electron.build/multi-platform-build#docker
|
|
docker run --rm -ti \
|
|
--env-file <(env | grep -iE '^BUILDKITE_API_KEY=') \
|
|
--env ELECTRON_CACHE="/root/.cache/electron" \
|
|
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
|
|
-v ${PWD}:/project \
|
|
-v ${PWD}/docker/node_modules:/project/node_modules \
|
|
-v ${PWD}/docker/.hak:/project/.hak \
|
|
-v ${PWD}/docker/.gnupg:/root/.gnupg \
|
|
-v ~/.cache/electron:/root/.cache/electron \
|
|
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
|
|
riot-desktop-dockerbuild "$@"
|