From 4409b8c4f8fb62d1ce3cac0dac399599dbef4a56 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 5 Jun 2019 17:35:26 -0400 Subject: [PATCH] fix torba version on travis --- .travis.yml | 10 ++++++---- scripts/Dockerfile.lbry_orchstr8 | 4 +++- scripts/Dockerfile.wallet_server | 3 ++- scripts/wine_build.sh | 11 +++++++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0cd3060e3..b498cdbb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ language: python python: "3.7" env: - - TORBA=master + global: + # must also be updated in wine_build.sh + - TORBA=master jobs: include: @@ -59,7 +61,7 @@ jobs: - docker pull lbry/pyinstaller34_32bits:py371 script: - python scripts/set_build.py - - docker run -v "$(pwd):/src/lbry" lbry/pyinstaller34_32bits:py371 lbry/scripts/wine_build.sh ${TORBA} + - docker run -v "$(pwd):/src/lbry" lbry/pyinstaller34_32bits:py371 lbry/scripts/wine_build.sh - sudo zip -j dist/lbrynet-windows.zip dist/lbrynet.exe deploy: provider: releases @@ -125,7 +127,7 @@ jobs: script: - set -e - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - - travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f scripts/Dockerfile.wallet_server . + - travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f scripts/Dockerfile.wallet_server --build-arg TORBA_VERSION=${TORBA} . - docker push lbry/wallet-server:$TRAVIS_TAG - if: tag IS blank AND branch = master AND NOT type IN (pull_request) stage: build @@ -133,7 +135,7 @@ jobs: script: - set -e - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - - travis_retry docker build -t lbry/wallet-server:master -f scripts/Dockerfile.wallet_server . + - travis_retry docker build -t lbry/wallet-server:master -f scripts/Dockerfile.wallet_server --build-arg TORBA_VERSION=${TORBA} . - docker push lbry/wallet-server:master cache: diff --git a/scripts/Dockerfile.lbry_orchstr8 b/scripts/Dockerfile.lbry_orchstr8 index e371c269d..8fd087a73 100644 --- a/scripts/Dockerfile.lbry_orchstr8 +++ b/scripts/Dockerfile.lbry_orchstr8 @@ -1,5 +1,7 @@ FROM debian:buster-slim +ARG TORBA_VERSION=master + RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ @@ -15,7 +17,7 @@ RUN python3.7 -m pip install --upgrade pip setuptools wheel COPY . /app WORKDIR /app -RUN python3.7 -m pip install git+https://github.com/lbryio/torba.git#egg=torba +RUN python3.7 -m pip install --user git+https://github.com/lbryio/torba.git@${TORBA_VERSION}#egg=torba RUN python3.7 -m pip install -e . # Orchstr8 API diff --git a/scripts/Dockerfile.wallet_server b/scripts/Dockerfile.wallet_server index 9524c7a62..b4d9a4815 100644 --- a/scripts/Dockerfile.wallet_server +++ b/scripts/Dockerfile.wallet_server @@ -1,6 +1,7 @@ FROM debian:buster-slim ARG user=lbry +ARG TORBA_VERSION=master # create an unprivileged user RUN groupadd -g 999 $user && useradd -r -u 999 -g $user $user @@ -23,7 +24,7 @@ WORKDIR /home/$user RUN python3.7 -m pip install --upgrade pip setuptools # get torba -RUN python3.7 -m pip install --user git+https://github.com/lbryio/torba.git#egg=torba +RUN python3.7 -m pip install --user git+https://github.com/lbryio/torba.git@${TORBA_VERSION}#egg=torba # get uvloop RUN python3.7 -m pip install --user uvloop diff --git a/scripts/wine_build.sh b/scripts/wine_build.sh index a98acf050..d9d342f97 100755 --- a/scripts/wine_build.sh +++ b/scripts/wine_build.sh @@ -1,9 +1,11 @@ set -x -TORBA=$1 +# must also be updated in travis.yml +TORBA_VERSION=master rm -rf /tmp/.wine-* apt-get -qq update apt-get -qq install -y git + pip install setuptools_scm cd lbry @@ -12,8 +14,13 @@ cd lbry wget -Onetifaces-0.10.7-cp37-cp37m-win32.whl https://ci.appveyor.com/api/buildjobs/6hworunifsymrhp2/artifacts/dist%2Fnetifaces-0.10.7-cp37-cp37m-win32.whl pip install netifaces-0.10.7-cp37-cp37m-win32.whl -pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba +git clone --depth=1 --single-branch --branch ${TORBA_VERSION} https://github.com/lbryio/torba.git +cd torba +pip install . +cd .. +rm -rf torba +pip show torba pip install -e . pip install pywin32