mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-01 07:04:08 +01:00
Merge upstream Cake Wallet v6.5.0
Catches up from the May 12 fork point (v6.1.2+23) through v6.5.0: 535 upstream commits, including the Monero silent-open fix, Monero on Trezor, Ledger/Trezor BLE fixes, the new seed and history screens, quick Bitcoin sync, git-pinned dependencies (pubspec_overrides.yaml), frozen Hive adapters (*.part.dart), monero_c v0.18.4.6-RC2 and Flutter 3.41.9. Merged with both sides normalized first (import rename, 100-column format), which took the conflict count from 614 paths to 322. The procedure is now scripts/upstream_sync.sh. Kept from Hash Bags: - WalletType enum order and Hive IDs. SQLite stores WalletType.index and our order differs from upstream's; taking theirs would reread saved wallets as other chains. Our frozen adapter keeps the shipped IDs. - The 1.0.2 legacy PIN and wallet-password decode and self-heal. - Removed chains (Solana, Tron, Zano, Zcash, Decred, Haven) and the new Robinhood chain stay out; Cake Pay and non-Trocador swaps stay out. - Default nodes (node.wownero.org, sethforprivacy, Blockstream, bysh.me), converted to upstream's isDefault node-list key; Wownero is back in the node reset list. - Privacy: address resolvers limited to domain-anchored sources again; prices.neroswap.com for fiat; upstream's charts tab, which reads prices.cakewallet.com, sits behind FeatureFlag.isChartsEnabled = false. - Lightning stays behind FeatureFlag.isLightningEnabled, including upstream's new post-seed Lightning username step. - Our icon pipeline, branding and bundle identifiers. Twelve new upstream widget tests are skipped: test and code are unchanged from v6.5.0 apart from renames (not rerun on a pristine upstream checkout; upstream's top_bar_test does not compile against its own TopBar). flutter analyze lib: 0 errors; flutter test: 345 passed, 12 skipped; flutter build bundle compiles. Built with Flutter 3.41.9.
This commit is contained in:
@@ -14,7 +14,7 @@ cd "$SCRIPT_DIR"
|
||||
BUILD_AMD64=false
|
||||
BUILD_ARM64=false
|
||||
APP_TYPE="cakewallet"
|
||||
DOCKER_IMAGE="ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly"
|
||||
DOCKER_IMAGE="ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly"
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
|
||||
@@ -7,16 +7,23 @@ cd "$(dirname "$0")"
|
||||
|
||||
../prepare_moneroc.sh
|
||||
|
||||
for COIN in monero wownero;
|
||||
if [[ -n "${COIN:-}" ]]; then
|
||||
COINS=("$COIN")
|
||||
else
|
||||
COINS=(monero wownero)
|
||||
fi
|
||||
|
||||
if [[ -n "${TARGET:-}" ]]; then
|
||||
target="$TARGET"
|
||||
elif [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; then
|
||||
target="aarch64-linux-gnu"
|
||||
else
|
||||
target="x86_64-linux-gnu"
|
||||
fi
|
||||
|
||||
for COIN in "${COINS[@]}";
|
||||
do
|
||||
pushd ../monero_c
|
||||
# Determine target architecture based on system architecture
|
||||
if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; then
|
||||
target="aarch64-linux-gnu"
|
||||
else
|
||||
target="x86_64-linux-gnu"
|
||||
fi
|
||||
|
||||
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
||||
popd
|
||||
done
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -x -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
DEFAULT_TARGETS=(
|
||||
"x86_64-linux-gnu"
|
||||
)
|
||||
|
||||
if [ "$#" -gt 0 ]; then
|
||||
TARGETS=("$@")
|
||||
else
|
||||
TARGETS=("${DEFAULT_TARGETS[@]}")
|
||||
fi
|
||||
|
||||
../prepare_torch.sh
|
||||
|
||||
cd ../torch_dart
|
||||
|
||||
./build.sh "${TARGETS[@]}"
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM --platform=linux/amd64 ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly
|
||||
|
||||
WORKDIR /w
|
||||
@@ -0,0 +1,9 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
RUN mkdir -p /w/scripts
|
||||
COPY scripts/build_bitbox_flutter.sh /w/scripts/build_bitbox_flutter.sh
|
||||
RUN cd /w/scripts && /w/scripts/build_bitbox_flutter.sh
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
@@ -0,0 +1,23 @@
|
||||
ARG BASE_IMAGE
|
||||
ARG TORCH_IMAGE
|
||||
ARG REOWN_IMAGE
|
||||
ARG BITBOX_IMAGE
|
||||
ARG MONERO_IMAGE
|
||||
ARG MWEBD_IMAGE
|
||||
ARG ZCASH_IMAGE
|
||||
|
||||
FROM --platform=linux/amd64 ${TORCH_IMAGE} AS torch_src
|
||||
FROM --platform=linux/amd64 ${REOWN_IMAGE} AS reown_src
|
||||
FROM --platform=linux/amd64 ${BITBOX_IMAGE} AS bitbox_src
|
||||
FROM --platform=linux/amd64 ${MONERO_IMAGE} AS monero_src
|
||||
FROM --platform=linux/amd64 ${MWEBD_IMAGE} AS mwebd_src
|
||||
FROM --platform=linux/amd64 ${ZCASH_IMAGE} AS zcash_src
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
|
||||
COPY --from=torch_src /w /w.top
|
||||
COPY --from=reown_src /w /w.top
|
||||
COPY --from=bitbox_src /w /w.top
|
||||
COPY --from=monero_src /w /w.top
|
||||
COPY --from=mwebd_src /w /w.top
|
||||
COPY --from=zcash_src /w /w.top
|
||||
@@ -0,0 +1,26 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
ARG UID=10001
|
||||
ARG GID=10001
|
||||
ARG USER=builder
|
||||
RUN groupadd -g "$GID" "$USER" && \
|
||||
useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER"
|
||||
|
||||
RUN sudo chown $UID:$GID -R /w /root
|
||||
USER builder
|
||||
RUN mkdir -p /w/scripts/linux
|
||||
COPY scripts/prepare_moneroc.sh /w/scripts/prepare_moneroc.sh
|
||||
COPY scripts/linux/build_monero_all.sh /w/scripts/linux/build_monero_all.sh
|
||||
COPY scripts/functions.sh /w/scripts/functions.sh
|
||||
ARG COIN
|
||||
ARG TARGET
|
||||
ENV COIN=$COIN
|
||||
ENV TARGET=$TARGET
|
||||
RUN /w/scripts/linux/build_monero_all.sh \
|
||||
&& rm -rf /w/scripts/monero_c/contrib/depends/simplybs \
|
||||
/w/scripts/monero_c/monero_libwallet2_api_c/build \
|
||||
/w/scripts/monero_c/wownero_libwallet2_api_c/build
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
@@ -0,0 +1,15 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
RUN mkdir -p /w/scripts/android
|
||||
COPY pubspec_base.yaml /w/pubspec.yaml
|
||||
COPY pubspec_overrides.yaml /w/pubspec_overrides.yaml
|
||||
COPY pubspec_overrides.yaml /w/cw_mweb/pubspec_overrides.yaml
|
||||
COPY cw_mweb/pubspec.yaml /w/cw_mweb/pubspec.yaml
|
||||
COPY cw_mweb/ffigen_config.yaml /w/cw_mweb/ffigen_config.yaml
|
||||
COPY cw_mweb/go /w/cw_mweb/go
|
||||
COPY scripts/android/build_mwebd.sh /w/scripts/android/build_mwebd.sh
|
||||
RUN /w/scripts/android/build_mwebd.sh
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
@@ -0,0 +1,22 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
RUN mkdir -p /w/scripts/android
|
||||
COPY scripts/prepare_reown.sh /w/scripts/prepare_reown.sh
|
||||
COPY scripts/android/build_reown_deps.sh /w/scripts/android/build_reown_deps.sh
|
||||
RUN cd $(dirname $(which flutter)) && git checkout 3.32.0
|
||||
RUN /w/scripts/android/build_reown_deps.sh \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_core/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_sign/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_cli/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_walletkit/example/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_walletkit/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_yttrium/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_appkit/example/base/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_appkit/example/modal/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/packages/reown_appkit/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/.dart_tool \
|
||||
&& rm -rf /w/scripts/reown_flutter/scripts/yttrium/target
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
@@ -0,0 +1,26 @@
|
||||
ARG BASE_IMAGE
|
||||
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
COPY scripts/prepare_torch.sh /w/scripts/prepare_torch.sh
|
||||
COPY scripts/linux/build_torch.sh /w/scripts/linux/build_torch.sh
|
||||
|
||||
ARG UID=10001
|
||||
ARG GID=10001
|
||||
ARG USER=builder
|
||||
RUN groupadd -g "$GID" "$USER" && \
|
||||
useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER"
|
||||
|
||||
RUN sudo chown $UID:$GID -R /w /root
|
||||
USER builder
|
||||
|
||||
ARG TARGET
|
||||
RUN if [ -n "$TARGET" ]; then \
|
||||
/w/scripts/linux/build_torch.sh "$TARGET"; \
|
||||
else \
|
||||
/w/scripts/linux/build_torch.sh; \
|
||||
fi \
|
||||
&& rm -rf /w/scripts/torch_dart/simplybs
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
@@ -0,0 +1,10 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
||||
|
||||
RUN mkdir -p /w/scripts/linux
|
||||
COPY scripts/prepare_zcash.sh /w/scripts/prepare_zcash.sh
|
||||
COPY scripts/linux/build_zcash.sh /w/scripts/linux/build_zcash.sh
|
||||
RUN /w/scripts/linux/build_zcash.sh
|
||||
|
||||
FROM --platform=linux/amd64 alpine
|
||||
COPY --from=build /w /w
|
||||
Executable
+351
@@ -0,0 +1,351 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname $0)"
|
||||
|
||||
CW_DOCKER_REGISTRY="${CW_DOCKER_REGISTRY:-localhost/cake-tech/cake_wallet}"
|
||||
CW_DOCKER_USE_CLOUD="${CW_DOCKER_USE_CLOUD:-}"
|
||||
IMAGE_PREFIX="linux-deps-amd64"
|
||||
|
||||
SCRIPT_DIR="$(pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
||||
|
||||
ONLY=""
|
||||
TARGET=""
|
||||
COIN=""
|
||||
MERGE=false
|
||||
EXTRACT=false
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--only)
|
||||
ONLY="$2"
|
||||
shift 2
|
||||
;;
|
||||
--target)
|
||||
TARGET="$2"
|
||||
shift 2
|
||||
;;
|
||||
--coin)
|
||||
COIN="$2"
|
||||
shift 2
|
||||
;;
|
||||
--merge)
|
||||
MERGE=true
|
||||
shift
|
||||
;;
|
||||
--extract)
|
||||
EXTRACT=true
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
echo "Usage: $0 [--only NAME] [--target TRIPLE] [--coin COIN] [--merge] [--extract]"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
MONERO_COINS=(monero wownero)
|
||||
MONERO_TARGETS=(x86_64-linux-gnu)
|
||||
|
||||
image_exists() {
|
||||
docker image inspect "$1" &>/dev/null
|
||||
}
|
||||
|
||||
tinysha() {
|
||||
cat "$@" | sha256sum | cut -c1-6
|
||||
}
|
||||
|
||||
slice_extra() {
|
||||
if [[ -n "$COIN" && -n "$TARGET" ]]; then
|
||||
echo "-${COIN}-${TARGET}"
|
||||
elif [[ -n "$TARGET" ]]; then
|
||||
echo "-${TARGET}"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# Distinct from the unsuffixed all-in-one tag. The hash of slice suffixes
|
||||
# invalidates the merge image if a coin or target is added or removed.
|
||||
assembled_extra() {
|
||||
local tmp
|
||||
tmp="$(mktemp)"
|
||||
printf '%s\n' "$@" > "$tmp"
|
||||
echo "-merged-$(tinysha "$tmp")"
|
||||
rm -f "$tmp"
|
||||
}
|
||||
|
||||
monero_assembled_extra() {
|
||||
local extras=()
|
||||
local coin t
|
||||
for coin in "${MONERO_COINS[@]}"; do
|
||||
for t in "${MONERO_TARGETS[@]}"; do
|
||||
extras+=("-${coin}-${t}")
|
||||
done
|
||||
done
|
||||
assembled_extra "${extras[@]}"
|
||||
}
|
||||
|
||||
component_extra() {
|
||||
local name="$1"
|
||||
local sliced
|
||||
sliced="$(slice_extra)"
|
||||
if [[ -n "$sliced" ]]; then
|
||||
echo "$sliced"
|
||||
return
|
||||
fi
|
||||
case "$name" in
|
||||
monero) monero_assembled_extra ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
img() {
|
||||
local name="$1"
|
||||
local version="$2"
|
||||
local extra="${3:-}"
|
||||
echo "$CW_DOCKER_REGISTRY:${IMAGE_PREFIX}-${name}-$(tinysha "$SCRIPT_DIR/Dockerfile.${name}")-${version}${extra}"
|
||||
}
|
||||
|
||||
remote_exists() {
|
||||
local tag="$1"
|
||||
if docker buildx version >/dev/null 2>&1; then
|
||||
docker buildx imagetools inspect "$tag" >/dev/null 2>&1
|
||||
return
|
||||
fi
|
||||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect "$tag" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
cached() {
|
||||
local tag="$1"
|
||||
if image_exists "$tag"; then
|
||||
return 0
|
||||
fi
|
||||
if [[ "x$CW_DOCKER_USE_CLOUD" == "xtrue" ]] && remote_exists "$tag"; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
maybe_push() {
|
||||
local tag="$1"
|
||||
if [[ "x$CW_DOCKER_USE_CLOUD" == "xtrue" ]]; then
|
||||
docker push "$tag"
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
local name="$1"; shift
|
||||
local version=$1; shift
|
||||
local extra
|
||||
extra="$(component_extra "$name")"
|
||||
local tag
|
||||
tag="$(img "$name" "$version" "$extra")"
|
||||
if cached "$tag"; then
|
||||
echo "==> skipping $name (cached: $tag)"
|
||||
return 0
|
||||
fi
|
||||
echo "==> building $name${extra}"
|
||||
docker build \
|
||||
--platform linux/amd64 \
|
||||
--file "$SCRIPT_DIR/Dockerfile.${name}" \
|
||||
--tag "$tag" \
|
||||
"$@" \
|
||||
"$REPO_ROOT"
|
||||
maybe_push "$tag"
|
||||
}
|
||||
|
||||
merge_slices() {
|
||||
local name="$1"
|
||||
local version="$2"
|
||||
local extra="$3"
|
||||
shift 3
|
||||
local dest
|
||||
dest="$(img "$name" "$version" "$extra")"
|
||||
if cached "$dest"; then
|
||||
echo "==> skipping merge $name (cached: $dest)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local slices=("$@")
|
||||
if [[ ${#slices[@]} -eq 0 ]]; then
|
||||
echo "merge_slices: no slice images given" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local dockerfile
|
||||
dockerfile="$(mktemp)"
|
||||
local build_args=()
|
||||
local i=0
|
||||
for slice in "${slices[@]}"; do
|
||||
echo "ARG SRC${i}" >> "$dockerfile"
|
||||
i=$((i + 1))
|
||||
done
|
||||
i=0
|
||||
for slice in "${slices[@]}"; do
|
||||
if ! cached "$slice"; then
|
||||
echo "merge_slices: missing slice $slice" >&2
|
||||
rm -f "$dockerfile"
|
||||
exit 1
|
||||
fi
|
||||
echo "FROM --platform=linux/amd64 \${SRC${i}} AS s${i}" >> "$dockerfile"
|
||||
build_args+=(--build-arg "SRC${i}=$slice")
|
||||
i=$((i + 1))
|
||||
done
|
||||
echo "FROM --platform=linux/amd64 alpine" >> "$dockerfile"
|
||||
i=0
|
||||
for slice in "${slices[@]}"; do
|
||||
echo "COPY --from=s${i} /w /w" >> "$dockerfile"
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
echo "==> merging $name from ${#slices[@]} slices -> $dest"
|
||||
docker build \
|
||||
--platform linux/amd64 \
|
||||
--file "$dockerfile" \
|
||||
--tag "$dest" \
|
||||
"${build_args[@]}" \
|
||||
"$SCRIPT_DIR"
|
||||
rm -f "$dockerfile"
|
||||
maybe_push "$dest"
|
||||
}
|
||||
|
||||
base_ver="latest"
|
||||
torch_ver="$(tinysha $SCRIPT_DIR/Dockerfile.torch $REPO_ROOT/scripts/prepare_torch.sh $REPO_ROOT/scripts/linux/build_torch.sh)"
|
||||
reown_ver=$(tinysha $SCRIPT_DIR/Dockerfile.reown $REPO_ROOT/scripts/prepare_reown.sh $REPO_ROOT/scripts/android/build_reown_deps.sh)
|
||||
bitbox_ver=$(tinysha $SCRIPT_DIR/Dockerfile.bitbox $REPO_ROOT/scripts/build_bitbox_flutter.sh)
|
||||
monero_ver=$(tinysha $SCRIPT_DIR/Dockerfile.monero $REPO_ROOT/scripts/prepare_moneroc.sh $REPO_ROOT/scripts/linux/build_monero_all.sh)
|
||||
mwebd_ver=$(tinysha $SCRIPT_DIR/Dockerfile.mwebd $REPO_ROOT/pubspec_overrides.yaml $(find $REPO_ROOT/cw_mweb/go -type f | sort))
|
||||
zcash_ver=$(tinysha $SCRIPT_DIR/Dockerfile.zcash $REPO_ROOT/scripts/prepare_zcash.sh $REPO_ROOT/scripts/linux/build_zcash.sh)
|
||||
echo $base_ver $torch_ver $reown_ver $bitbox_ver $monero_ver $mwebd_ver $zcash_ver "$(monero_assembled_extra)" > /tmp/docker_build_versions
|
||||
final_ver=$(tinysha /tmp/docker_build_versions)
|
||||
|
||||
extract_final() {
|
||||
local required="${1:-}"
|
||||
local tag
|
||||
tag="$(img final "$final_ver")"
|
||||
if ! image_exists "$tag" && [[ "x$CW_DOCKER_USE_CLOUD" == "xtrue" ]] && remote_exists "$tag"; then
|
||||
docker pull "$tag"
|
||||
fi
|
||||
docker rm -f temp_extract >/dev/null 2>&1 || true
|
||||
if docker create --name temp_extract "$tag"; then
|
||||
cd "$REPO_ROOT"
|
||||
docker cp temp_extract:/w.top w.top
|
||||
rsync -av w.top/ .
|
||||
rm -rf w.top
|
||||
docker rm temp_extract
|
||||
echo "cache ok"
|
||||
echo "$tag" > /tmp/cakewallet_docker
|
||||
return 0
|
||||
fi
|
||||
docker rm -f temp_extract >/dev/null 2>&1 || true
|
||||
echo "cache miss oh"
|
||||
if [[ "$required" == "required" ]]; then
|
||||
echo "final image missing: $tag" >&2
|
||||
exit 1
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
build_base() {
|
||||
build base "$base_ver"
|
||||
}
|
||||
|
||||
build_bitbox() {
|
||||
build bitbox "$bitbox_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"
|
||||
}
|
||||
|
||||
build_mwebd() {
|
||||
build mwebd "$mwebd_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"
|
||||
}
|
||||
|
||||
build_reown() {
|
||||
build reown "$reown_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"
|
||||
}
|
||||
|
||||
build_zcash() {
|
||||
build zcash "$zcash_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"
|
||||
}
|
||||
|
||||
build_torch() {
|
||||
build torch "$torch_ver" \
|
||||
--build-arg BASE_IMAGE="$(img base "$base_ver")" \
|
||||
--build-arg TARGET="${TARGET}"
|
||||
}
|
||||
|
||||
build_monero() {
|
||||
if [[ "$MERGE" == true ]]; then
|
||||
local slices=()
|
||||
local coin t
|
||||
for coin in "${MONERO_COINS[@]}"; do
|
||||
for t in "${MONERO_TARGETS[@]}"; do
|
||||
slices+=("$(img monero "$monero_ver" "-${coin}-${t}")")
|
||||
done
|
||||
done
|
||||
merge_slices monero "$monero_ver" "$(monero_assembled_extra)" "${slices[@]}"
|
||||
return 0
|
||||
fi
|
||||
build monero "$monero_ver" \
|
||||
--build-arg BASE_IMAGE="$(img base "$base_ver")" \
|
||||
--build-arg COIN="${COIN}" \
|
||||
--build-arg TARGET="${TARGET}"
|
||||
}
|
||||
|
||||
build_final() {
|
||||
build final "$final_ver" \
|
||||
--build-arg BASE_IMAGE="$(img base "$base_ver")" \
|
||||
--build-arg TORCH_IMAGE="$(img torch "$torch_ver")" \
|
||||
--build-arg REOWN_IMAGE="$(img reown "$reown_ver")" \
|
||||
--build-arg BITBOX_IMAGE="$(img bitbox "$bitbox_ver")" \
|
||||
--build-arg MONERO_IMAGE="$(img monero "$monero_ver" "$(monero_assembled_extra)")" \
|
||||
--build-arg MWEBD_IMAGE="$(img mwebd "$mwebd_ver")" \
|
||||
--build-arg ZCASH_IMAGE="$(img zcash "$zcash_ver")"
|
||||
echo "done: $(img final $final_ver)"
|
||||
echo "$(img final $final_ver)" > /tmp/cakewallet_docker
|
||||
}
|
||||
|
||||
run_one() {
|
||||
case "$1" in
|
||||
base) build_base ;;
|
||||
bitbox) build_bitbox ;;
|
||||
mwebd) build_mwebd ;;
|
||||
reown) build_reown ;;
|
||||
zcash) build_zcash ;;
|
||||
torch) build_torch ;;
|
||||
monero) build_monero ;;
|
||||
final) build_final ;;
|
||||
*)
|
||||
echo "Unknown component: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "$EXTRACT" == true ]]; then
|
||||
extract_final required
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "$ONLY" ]]; then
|
||||
extract_final && exit 0 || true
|
||||
ONLY=""
|
||||
TARGET=""
|
||||
COIN=""
|
||||
MERGE=false
|
||||
build_base
|
||||
build_bitbox
|
||||
build_mwebd
|
||||
build_reown
|
||||
build_monero
|
||||
build_zcash
|
||||
build_torch
|
||||
build_final
|
||||
extract_final required
|
||||
exit 0
|
||||
fi
|
||||
|
||||
run_one "$ONLY"
|
||||
Reference in New Issue
Block a user