diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f641238fd..10c7bd5525 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -541,6 +541,9 @@ jobs: command: | git config --global user.email "contact@raiden.network" git config --global user.name "Raiden Network" + - run: + name: Configure SSH + command: .circleci/fetch_ssh_hostkey.sh github.com "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8" - run: name: Checkout homebrew-raiden command: | @@ -549,18 +552,19 @@ jobs: name: Update Formula command: | source .circleci/get_archive_tag.sh - UPDATED_SHA256=$(openssl dgst -sha256 dist/archive/raiden-${ARCHIVE_TAG}-macOS.zip) - FORMULA_FILE="homebrew-raiden/raiden.rb" - sed -i .bak -E "s/[0-9]+\.[0-9]+\.[0-9]+/${ARCHIVE_TAG/v/}/g" ${FORMULA_FILE} - sed -i .bak -E "s/sha256 \"[a-f0-9]\{64\}\"/sha256 \"${UPDATED_SHA256: -64}\"/g" ${FORMULA_FILE} - rm $FORMULA_FILE.bak + export UPDATED_SHA256=$(openssl dgst -sha256 dist/archive/raiden-${ARCHIVE_TAG}-macOS-x86_64.zip) + export FORMULA_FILE="homebrew-raiden/raiden.rb" + sed -i.bak -r "s/[0-9]+\.[0-9]+\.[0-9]+(-?rc.)?/${ARCHIVE_TAG/v/}/g" ${FORMULA_FILE} + sed -i.bak -r "s/sha256 \"[a-f0-9]\{64\}\"/sha256 \"${UPDATED_SHA256: -64}\"/g" ${FORMULA_FILE} + rm ${FORMULA_FILE}.bak - run: name: Commit and Push Updated Formula command: | + source .circleci/get_archive_tag.sh pushd homebrew-raiden git add raiden.rb - git commit -m "Update formula to ${TRAVIS_TAG}" - git tag -a "${TRAVIS_TAG}" -m "${TRAVIS_TAG}" + git commit -m "Update formula to ${ARCHIVE_TAG}" + git tag -a "${ARCHIVE_TAG}" -m "${ARCHIVE_TAG}" git push --follow-tags popd diff --git a/.circleci/fetch_ssh_hostkey.sh b/.circleci/fetch_ssh_hostkey.sh new file mode 100755 index 0000000000..692ef507b7 --- /dev/null +++ b/.circleci/fetch_ssh_hostkey.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -ex + +HOST="$1" +FINGERPRINT="$2" + +PUBKEY=$(mktemp) + +ssh-keyscan -H ${HOST} > ${PUBKEY} 2>/dev/null + +if [[ $(ssh-keygen -l -f ${PUBKEY} | cut -d ' ' -f 2) != ${FINGERPRINT} ]]; then + echo "Warning fingerprint mismatch while fetching public key for ${HOST}" + exit 1 +fi + +cat ${PUBKEY} >> ~/.ssh/known_hosts diff --git a/raiden/accounts.py b/raiden/accounts.py index 0237793ee5..cd191d581d 100644 --- a/raiden/accounts.py +++ b/raiden/accounts.py @@ -99,10 +99,7 @@ def __init__(self, keystore_path: str = None): data = json.load(data_file) address = add_0x_prefix(str(data['address']).lower()) self.accounts[address] = str(fullpath) - except ( - IOError, - OSError, - ) as ex: + except OSError as ex: msg = 'Can not read account file (errno=%s)' % ex.errno log.warning(msg, path=fullpath, ex=ex) except( diff --git a/requirements-lint.txt b/requirements-lint.txt index 805e355b57..6833fa7b00 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -5,4 +5,6 @@ flake8-tuple==0.2.13 isort==4.2.15 readme-renderer==21.0 pylint==2.1.1 +# Dependency of pylint, pinned until https://github.com/PyCQA/astroid/issues/651 is fixed +astroid==2.1.0 mypy==0.641