Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was removing the space in -i.bak done on purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was. Previously (on Travis) this ran on macOS which has BSD sed. On Circle this is now running in a linux container with gnu sed which (for whatever reason) doesn't accept a space after the -i option.

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

Expand Down
17 changes: 17 additions & 0 deletions .circleci/fetch_ssh_hostkey.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions raiden/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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