Browse Source

build: try to consolidate instructions and decr codedupe in release.sh

patch-4
SomberNight 4 years ago
parent
commit
9d46fe775a
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 25
      .travis.yml
  2. 44
      contrib/android/Readme.md
  3. 68
      contrib/android/build.sh
  4. 10
      contrib/android/build_docker_image.sh
  5. 19
      contrib/build-linux/appimage/README.md
  6. 57
      contrib/build-linux/appimage/build.sh
  7. 33
      contrib/build-linux/sdist/README.md
  8. 57
      contrib/build-linux/sdist/build.sh
  9. 35
      contrib/build-wine/README.md
  10. 56
      contrib/build-wine/build.sh
  11. 70
      contrib/release.sh

25
.travis.yml

@ -58,10 +58,8 @@ jobs:
- sudo apt-get update - sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker version - docker version
install:
- sudo docker build --no-cache -t electrum-wine-builder-img ./contrib/build-wine/
script: script:
- sudo docker run --name electrum-wine-builder-cont -v $PWD:/opt/wine64/drive_c/electrum --rm --workdir /opt/wine64/drive_c/electrum/contrib/build-wine electrum-wine-builder-img ./make_win.sh - ELECBUILD_COMMIT=HEAD ./contrib/build-wine/build.sh
after_success: true after_success: true
- if: (branch = master) OR (tag IS present) - if: (branch = master) OR (tag IS present)
name: "Android build" name: "Android build"
@ -69,13 +67,11 @@ jobs:
python: 3.7 python: 3.7
services: services:
- docker - docker
install:
- ./contrib/android/build_docker_image.sh
script: script:
- sudo chown -R 1000:1000 . - sudo chown -R 1000:1000 .
# Output something every minute or Travis kills the job # Output something every minute or Travis kills the job
- while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done & - while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done &
- sudo docker run -it -u 1000:1000 --rm --name electrum-android-builder-cont --env CI=true -v $PWD:/home/user/wspace/electrum --workdir /home/user/wspace/electrum electrum-android-builder-img ./contrib/android/make_apk - ELECBUILD_COMMIT=HEAD ./contrib/android/build.sh
# kill background sleep loop # kill background sleep loop
- kill %1 - kill %1
- ls -la dist - ls -la dist
@ -100,10 +96,8 @@ jobs:
python: false python: false
services: services:
- docker - docker
install:
- sudo docker build --no-cache -t electrum-appimage-builder-img ./contrib/build-linux/appimage/
script: script:
- sudo docker run --name electrum-appimage-builder-cont -v $PWD:/opt/electrum --rm --workdir /opt/electrum/contrib/build-linux/appimage electrum-appimage-builder-img ./make_appimage.sh - ELECBUILD_COMMIT=HEAD ./contrib/build-linux/appimage/build.sh
after_success: true after_success: true
- if: (branch = master) OR (tag IS present) - if: (branch = master) OR (tag IS present)
name: "tarball build" name: "tarball build"
@ -111,19 +105,8 @@ jobs:
python: false python: false
services: services:
- docker - docker
before_install:
# hack: travis already cloned the repo, but we re-clone now, as we need to have umask set BEFORE cloning
- umask 0022
- mkdir fresh_clone && cd fresh_clone
- git clone https://github.com/$TRAVIS_REPO_SLUG.git && cd electrum
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git fetch origin pull/$TRAVIS_PULL_REQUEST/merge; fi
- git checkout $TRAVIS_COMMIT
- echo "Second git clone ready at $PWD"
install:
- sudo docker build --no-cache -t electrum-sdist-builder-img ./contrib/build-linux/sdist/
script: script:
- echo "Building sdist at $PWD" - ELECBUILD_COMMIT=HEAD ./contrib/build-linux/sdist/build.sh
- sudo docker run --name electrum-sdist-builder-cont -v $PWD:/opt/electrum --rm --workdir /opt/electrum/contrib/build-linux/sdist electrum-sdist-builder-img ./make_sdist.sh
after_success: true after_success: true
- stage: release check - stage: release check
install: install:

44
contrib/android/Readme.md

@ -9,8 +9,7 @@ To generate an APK file, follow these instructions.
binaries that match the official releases._ binaries that match the official releases._
This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another
similar system. The docker commands should be executed in the project's root similar system.
folder.
1. Install Docker 1. Install Docker
@ -21,47 +20,20 @@ folder.
$ sudo apt-get install -y docker-ce $ sudo apt-get install -y docker-ce
``` ```
2. Build image 2. Build binaries
``` ```
$ ./contrib/android/build_docker_image.sh $ ./build.sh
``` ```
If you want reproducibility, try instead e.g.:
3. Build binaries
It's recommended to build from a fresh clone
(but you can skip this if reproducibility is not necessary).
``` ```
$ FRESH_CLONE="contrib/android/fresh_clone/electrum" && \ $ ELECBUILD_COMMIT=HEAD ELECBUILD_NOCACHE=1 ./build.sh release-unsigned
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
``` ```
And then build from this directory:
```
$ git checkout $REV
$ mkdir --parents $PWD/.buildozer/.gradle
$ sudo docker run -it --rm \
--name electrum-android-builder-cont \
-v $PWD:/home/user/wspace/electrum \
-v $PWD/.buildozer/.gradle:/home/user/.gradle \
-v ~/.keystore:/home/user/.keystore \
--workdir /home/user/wspace/electrum \
electrum-android-builder-img \
./contrib/android/make_apk
```
Note: this builds a debug apk. `make_apk` takes an optional parameter
which can be either `release` or `release-unsigned`.
This mounts the project dir inside the container, Note: `build.sh` takes an optional parameter which can be
and so the modifications will affect it, e.g. `.buildozer` folder `release`, `release-unsigned`, or `debug` (default).
will be created.
5. The generated binary is in `./dist`. 3. The generated binary is in `./dist`.
## Verifying reproducibility and comparing against official binary ## Verifying reproducibility and comparing against official binary

68
contrib/android/build.sh

@ -0,0 +1,68 @@
#!/bin/bash
#
# env vars:
# - ELECBUILD_NOCACHE: if set, forces rebuild of docker image
# - ELECBUILD_COMMIT: if set, do a fresh clone and git checkout
set -e
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../.."
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$PROJECT_ROOT"
CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_ANDROID="$CONTRIB/android"
DISTDIR="$PROJECT_ROOT/dist"
. "$CONTRIB"/build_tools_util.sh
DOCKER_BUILD_FLAGS=""
if [ ! -z "$ELECBUILD_NOCACHE" ] ; then
info "ELECBUILD_NOCACHE is set. forcing rebuild of docker image."
DOCKER_BUILD_FLAGS="--pull --no-cache"
fi
info "building docker image."
cp "$CONTRIB/deterministic-build/requirements-build-android.txt" "$CONTRIB_ANDROID/requirements-build-android.txt"
sudo docker build \
$DOCKER_BUILD_FLAGS \
-t electrum-android-builder-img \
"$CONTRIB_ANDROID"
rm "$CONTRIB_ANDROID/requirements-build-android.txt"
# maybe do fresh clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
info "ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout."
FRESH_CLONE="$CONTRIB_ANDROID/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone "$PROJECT_ROOT" "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "$ELECBUILD_COMMIT"
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$FRESH_CLONE"
else
info "not doing fresh clone."
fi
DOCKER_RUN_FLAGS=""
if [[ -n "$1" && "$1" == "release" ]] ; then
info "'release' mode selected. mounting ~/.keystore inside container."
DOCKER_RUN_FLAGS="-v $HOME/.keystore:/home/user/.keystore"
fi
info "building binary..."
mkdir --parents "$PROJECT_ROOT_OR_FRESHCLONE_ROOT"/.buildozer/.gradle
sudo docker run -it --rm \
--name electrum-android-builder-cont \
-v "$PROJECT_ROOT_OR_FRESHCLONE_ROOT":/home/user/wspace/electrum \
-v "$PROJECT_ROOT_OR_FRESHCLONE_ROOT"/.buildozer/.gradle:/home/user/.gradle \
$DOCKER_RUN_FLAGS \
--workdir /home/user/wspace/electrum \
electrum-android-builder-img \
./contrib/android/make_apk "$@"
# make sure resulting binary location is independent of fresh_clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
mkdir --parents "$DISTDIR/"
sudo cp -f "$FRESH_CLONE/dist"/* "$DISTDIR/"
fi

10
contrib/android/build_docker_image.sh

@ -1,10 +0,0 @@
#!/bin/bash
set -e
CONTRIB_ANDROID="$(dirname "$(readlink -e "$0")")"
CONTRIB="$CONTRIB_ANDROID"/..
cp "$CONTRIB/deterministic-build/requirements-build-android.txt" "$CONTRIB_ANDROID/requirements-build-android.txt"
sudo docker build -t electrum-android-builder-img "$CONTRIB_ANDROID"
rm "$CONTRIB_ANDROID/requirements-build-android.txt"

19
contrib/build-linux/appimage/README.md

@ -6,7 +6,6 @@ AppImage binary for Electrum
This assumes an Ubuntu host, but it should not be too hard to adapt to another This assumes an Ubuntu host, but it should not be too hard to adapt to another
similar system. The host architecture should be x86_64 (amd64). similar system. The host architecture should be x86_64 (amd64).
The docker commands should be executed in the project's root folder.
We currently only build a single AppImage, for x86_64 architecture. We currently only build a single AppImage, for x86_64 architecture.
Help to adapt these scripts to build for (some flavor of) ARM would be welcome, Help to adapt these scripts to build for (some flavor of) ARM would be welcome,
@ -22,25 +21,17 @@ see [issue #5159](https://github.com/spesmilo/electrum/issues/5159).
$ sudo apt-get install -y docker-ce $ sudo apt-get install -y docker-ce
``` ```
2. Build image 2. Build binary
``` ```
$ sudo docker build -t electrum-appimage-builder-img contrib/build-linux/appimage $ ./build.sh
``` ```
If you want reproducibility, try instead e.g.:
3. Build binary
``` ```
$ sudo docker run -it \ $ ELECBUILD_COMMIT=HEAD ELECBUILD_NOCACHE=1 ./build.sh
--name electrum-appimage-builder-cont \
-v $PWD:/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/appimage \
electrum-appimage-builder-img \
./make_appimage.sh
``` ```
4. The generated binary is in `./dist`. 3. The generated binary is in `./dist`.
## FAQ ## FAQ

57
contrib/build-linux/appimage/build.sh

@ -0,0 +1,57 @@
#!/bin/bash
#
# env vars:
# - ELECBUILD_NOCACHE: if set, forces rebuild of docker image
# - ELECBUILD_COMMIT: if set, do a fresh clone and git checkout
set -e
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../../.."
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$PROJECT_ROOT"
CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_APPIMAGE="$CONTRIB/build-linux/appimage"
DISTDIR="$PROJECT_ROOT/dist"
. "$CONTRIB"/build_tools_util.sh
DOCKER_BUILD_FLAGS=""
if [ ! -z "$ELECBUILD_NOCACHE" ] ; then
info "ELECBUILD_NOCACHE is set. forcing rebuild of docker image."
DOCKER_BUILD_FLAGS="--pull --no-cache"
fi
info "building docker image."
sudo docker build \
$DOCKER_BUILD_FLAGS \
-t electrum-appimage-builder-img \
"$CONTRIB_APPIMAGE"
# maybe do fresh clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
info "ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout."
FRESH_CLONE="$CONTRIB_APPIMAGE/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone "$PROJECT_ROOT" "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "$ELECBUILD_COMMIT"
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$FRESH_CLONE"
else
info "not doing fresh clone."
fi
info "building binary..."
sudo docker run -it \
--name electrum-appimage-builder-cont \
-v "$PROJECT_ROOT_OR_FRESHCLONE_ROOT":/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/appimage \
electrum-appimage-builder-img \
./make_appimage.sh
# make sure resulting binary location is independent of fresh_clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
mkdir --parents "$DISTDIR/"
sudo cp -f "$FRESH_CLONE/dist"/* "$DISTDIR/"
fi

33
contrib/build-linux/sdist/README.md

@ -5,8 +5,7 @@ Source tarballs
distributables that match the official releases._ distributables that match the official releases._
This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another
similar system. The docker commands should be executed in the project's root similar system.
folder.
1. Install Docker 1. Install Docker
@ -17,34 +16,14 @@ folder.
$ sudo apt-get install -y docker-ce $ sudo apt-get install -y docker-ce
``` ```
2. Build image 2. Build source tarball
``` ```
$ sudo docker build -t electrum-sdist-builder-img contrib/build-linux/sdist $ ./build.sh
``` ```
If you want reproducibility, try instead e.g.:
3. Build source tarballs
It's recommended to build from a fresh clone
(but you can skip this if reproducibility is not necessary).
``` ```
$ FRESH_CLONE="contrib/build-linux/sdist/fresh_clone/electrum" && \ $ ELECBUILD_COMMIT=HEAD ELECBUILD_NOCACHE=1 ./build.sh
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
``` ```
And then build from this directory: 3. The generated distributables are in `./dist`.
```
$ git checkout $REV
$ sudo docker run -it \
--name electrum-sdist-builder-cont \
-v $PWD:/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/sdist \
electrum-sdist-builder-img \
./make_sdist.sh
```
4. The generated distributables are in `./dist`.

57
contrib/build-linux/sdist/build.sh

@ -0,0 +1,57 @@
#!/bin/bash
#
# env vars:
# - ELECBUILD_NOCACHE: if set, forces rebuild of docker image
# - ELECBUILD_COMMIT: if set, do a fresh clone and git checkout
set -e
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../../.."
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$PROJECT_ROOT"
CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_SDIST="$CONTRIB/build-linux/sdist"
DISTDIR="$PROJECT_ROOT/dist"
. "$CONTRIB"/build_tools_util.sh
DOCKER_BUILD_FLAGS=""
if [ ! -z "$ELECBUILD_NOCACHE" ] ; then
info "ELECBUILD_NOCACHE is set. forcing rebuild of docker image."
DOCKER_BUILD_FLAGS="--pull --no-cache"
fi
info "building docker image."
sudo docker build \
$DOCKER_BUILD_FLAGS \
-t electrum-sdist-builder-img \
"$CONTRIB_SDIST"
# maybe do fresh clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
info "ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout."
FRESH_CLONE="$CONTRIB_SDIST/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone "$PROJECT_ROOT" "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "$ELECBUILD_COMMIT"
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$FRESH_CLONE"
else
info "not doing fresh clone."
fi
info "building binary..."
sudo docker run -it \
--name electrum-sdist-builder-cont \
-v "$PROJECT_ROOT_OR_FRESHCLONE_ROOT":/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/sdist \
electrum-sdist-builder-img \
./make_sdist.sh
# make sure resulting binary location is independent of fresh_clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
mkdir --parents "$DISTDIR/"
sudo cp -f "$FRESH_CLONE/dist"/* "$DISTDIR/"
fi

35
contrib/build-wine/README.md

@ -5,8 +5,7 @@ Windows binaries
binaries that match the official releases._ binaries that match the official releases._
This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another
similar system. The docker commands should be executed in the project's root similar system.
folder.
1. Install Docker 1. Install Docker
@ -21,39 +20,17 @@ folder.
(see [#6971](https://github.com/spesmilo/electrum/issues/6971)). (see [#6971](https://github.com/spesmilo/electrum/issues/6971)).
If having problems, try to upgrade to at least `docker 20.10`. If having problems, try to upgrade to at least `docker 20.10`.
2. Build image 2. Build Windows binaries
``` ```
$ sudo docker build -t electrum-wine-builder-img contrib/build-wine $ ./build.sh
``` ```
If you want reproducibility, try instead e.g.:
Note: see [this](https://stackoverflow.com/a/40516974/7499128) if having dns problems
3. Build Windows binaries
It's recommended to build from a fresh clone
(but you can skip this if reproducibility is not necessary).
``` ```
$ FRESH_CLONE="contrib/build-wine/fresh_clone/electrum" && \ $ ELECBUILD_COMMIT=HEAD ELECBUILD_NOCACHE=1 ./build.sh
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
``` ```
And then build from this directory: 3. The generated binaries are in `./contrib/build-wine/dist`.
```
$ git checkout $REV
$ sudo docker run -it \
--name electrum-wine-builder-cont \
-v $PWD:/opt/wine64/drive_c/electrum \
--rm \
--workdir /opt/wine64/drive_c/electrum/contrib/build-wine \
electrum-wine-builder-img \
./make_win.sh
```
4. The generated binaries are in `./contrib/build-wine/dist`.

56
contrib/build-wine/build.sh

@ -0,0 +1,56 @@
#!/bin/bash
#
# env vars:
# - ELECBUILD_NOCACHE: if set, forces rebuild of docker image
# - ELECBUILD_COMMIT: if set, do a fresh clone and git checkout
set -e
PROJECT_ROOT="$(dirname "$(readlink -e "$0")")/../.."
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$PROJECT_ROOT"
CONTRIB="$PROJECT_ROOT/contrib"
CONTRIB_WINE="$CONTRIB/build-wine"
. "$CONTRIB"/build_tools_util.sh
DOCKER_BUILD_FLAGS=""
if [ ! -z "$ELECBUILD_NOCACHE" ] ; then
info "ELECBUILD_NOCACHE is set. forcing rebuild of docker image."
DOCKER_BUILD_FLAGS="--pull --no-cache"
fi
info "building docker image."
sudo docker build \
$DOCKER_BUILD_FLAGS \
-t electrum-wine-builder-img \
"$CONTRIB_WINE"
# maybe do fresh clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
info "ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout."
FRESH_CLONE="$CONTRIB_WINE/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone "$PROJECT_ROOT" "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "$ELECBUILD_COMMIT"
PROJECT_ROOT_OR_FRESHCLONE_ROOT="$FRESH_CLONE"
else
info "not doing fresh clone."
fi
info "building binary..."
sudo docker run -it \
--name electrum-wine-builder-cont \
-v "$PROJECT_ROOT_OR_FRESHCLONE_ROOT":/opt/wine64/drive_c/electrum \
--rm \
--workdir /opt/wine64/drive_c/electrum/contrib/build-wine \
electrum-wine-builder-img \
./make_win.sh
# make sure resulting binary location is independent of fresh_clone
if [ ! -z "$ELECBUILD_COMMIT" ] ; then
mkdir --parents "$PROJECT_ROOT/contrib/build-wine/dist/"
sudo cp -f "$FRESH_CLONE/contrib/build-wine/dist"/* "$PROJECT_ROOT/contrib/build-wine/dist/"
fi

70
contrib/release.sh

@ -24,6 +24,9 @@ REV=`git describe --tags`
echo "REV: $REV" echo "REV: $REV"
COMMIT=$(git rev-parse HEAD) COMMIT=$(git rev-parse HEAD)
export ELECBUILD_COMMIT="${COMMIT}^{commit}"
#export ELECBUILD_NOCACHE=1
git_status=$(git status --porcelain) git_status=$(git status --porcelain)
if [ ! -z "$git_status" ]; then if [ ! -z "$git_status" ]; then
@ -39,23 +42,7 @@ target=Electrum-$VERSION.tar.gz
if test -f dist/$target; then if test -f dist/$target; then
echo "file exists: $target" echo "file exists: $target"
else else
pushd . ./contrib/build-linux/sdist/build.sh
sudo docker build -t electrum-sdist-builder-img contrib/build-linux/sdist
FRESH_CLONE="contrib/build-linux/sdist/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "${COMMIT}^{commit}"
sudo docker run -it \
--name electrum-sdist-builder-cont \
-v $PWD:/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/sdist \
electrum-sdist-builder-img \
./make_sdist.sh
popd
cp /opt/electrum/contrib/build-linux/sdist/fresh_clone/electrum/dist/$target dist/
fi fi
# appimage # appimage
@ -68,14 +55,7 @@ fi
if test -f dist/$target; then if test -f dist/$target; then
echo "file exists: $target" echo "file exists: $target"
else else
sudo docker build -t electrum-appimage-builder-img contrib/build-linux/appimage ./contrib/build-linux/appimage/build.sh
sudo docker run -it \
--name electrum-appimage-builder-cont \
-v $PWD:/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-linux/appimage \
electrum-appimage-builder-img \
./make_appimage.sh
fi fi
@ -85,20 +65,7 @@ if test -f dist/$target; then
echo "file exists: $target" echo "file exists: $target"
else else
pushd . pushd .
FRESH_CLONE="contrib/build-wine/fresh_clone/electrum" && \ ./contrib/build-wine/build.sh
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "${COMMIT}^{commit}"
sudo docker run -it \
--name electrum-wine-builder-cont \
-v $PWD:/opt/wine64/drive_c/electrum \
--rm \
--workdir /opt/wine64/drive_c/electrum/contrib/build-wine \
electrum-wine-builder-img \
./make_win.sh
# do this in the fresh clone directory!
cd contrib/build-wine/ cd contrib/build-wine/
./sign.sh ./sign.sh
cp ./signed/*.exe /opt/electrum/dist/ cp ./signed/*.exe /opt/electrum/dist/
@ -112,28 +79,7 @@ target2=Electrum-$VERSION.0-arm64-v8a-release.apk
if test -f dist/$target1; then if test -f dist/$target1; then
echo "file exists: $target1" echo "file exists: $target1"
else else
pushd . ./contrib/android/build.sh release
./contrib/android/build_docker_image.sh
FRESH_CLONE="contrib/android/fresh_clone/electrum" && \
sudo rm -rf "$FRESH_CLONE" && \
umask 0022 && \
git clone . "$FRESH_CLONE" && \
cd "$FRESH_CLONE"
git checkout "${COMMIT}^{commit}"
mkdir --parents $PWD/.buildozer/.gradle
sudo docker run -it --rm \
--name electrum-android-builder-cont \
-v $PWD:/home/user/wspace/electrum \
-v $PWD/.buildozer/.gradle:/home/user/.gradle \
-v ~/.keystore:/home/user/.keystore \
--workdir /home/user/wspace/electrum \
electrum-android-builder-img \
./contrib/android/make_apk release
popd
cp contrib/android/fresh_clone/electrum/dist/$target1 dist/
cp contrib/android/fresh_clone/electrum/dist/$target2 dist/
fi fi
@ -153,7 +99,7 @@ fi
echo "build complete" echo "build complete"
sha256sum dist/*.tar.gz sha256sum dist/*.tar.gz
sha256sum dist/*.AppImage sha256sum dist/*.AppImage
sha256sum contrib/build-wine/fresh_clone/electrum/contrib/build-wine/dist/*.exe sha256sum contrib/build-wine/dist/*.exe
echo -n "proceed (y/n)? " echo -n "proceed (y/n)? "
read answer read answer

Loading…
Cancel
Save