From 4c61c1edf1dadea63df66e56503bcc04fa861da0 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 25 Oct 2018 16:50:29 +0200 Subject: [PATCH] Fix CircleCI config (libfuse) and release on non-linux platforms closes #1593 --- .circleci/config.yml | 2 +- scripts/release.sh | 100 ++++++++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 46 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c9faa4ea..4ef83dc7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: build: <<: *defaults steps: - - run: sudo apt-get install -y libudev-dev + - run: sudo apt-get install -y libudev-dev libfuse-dev - run: name: Install latest yarn command: | diff --git a/scripts/release.sh b/scripts/release.sh index 14a573e9..34a31fcb 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -69,48 +69,58 @@ fi runJob "yarn compile" "compiling..." "compiled" "failed to compile" "verbose" -# -------------------------------------------------------------------- -# Linux: Internal process error (null) -# -# context: https://github.com/LedgerHQ/ledger-live-desktop/issues/1010 -# Linux: Internal process error (null) -# -# The "fix" is not optimal, as it doesn't really solve the problem -# (electron loading system openssl before we can load our embedded one) -# Quick summary: -# -# - build without publishing -# - unpack the .AppImage -# - download reported working libs from ubuntu mirrors, put it inside -# - re-pack the .AppImage -# - checksum stuff -# - upload to gh - -runJob \ - "DEBUG=electron-builder electron-builder build --publish never" \ - "building and packaging app..." \ - "app built and packaged successfully" \ - "failed to build app" \ - "verbose" - -runJob \ - "scripts/patch-appimage.sh" \ - "patching AppImage..." \ - "AppImage patched successfully" \ - "failed to patch AppImage" - -LEDGER_LIVE_VERSION=$(grep version package.json | sed -E 's/.*: "(.*)",/\1/g') - -scripts/upload-github-release-asset.sh \ - github_api_token="$GH_TOKEN" \ - owner=LedgerHQ \ - repo=ledger-live-desktop \ - tag="$GH_TAG" \ - filename="dist/ledger-live-desktop-$LEDGER_LIVE_VERSION-linux-x86_64.AppImage" - -scripts/upload-github-release-asset.sh \ - github_api_token="$GH_TOKEN" \ - owner=LedgerHQ \ - repo=ledger-live-desktop \ - tag="$GH_TAG" \ - filename="dist/latest-linux.yml" +if [[ $(uname) == 'Linux' ]]; then + # -------------------------------------------------------------------- + # Linux: Internal process error (null) + # + # context: https://github.com/LedgerHQ/ledger-live-desktop/issues/1010 + # Linux: Internal process error (null) + # + # The "fix" is not optimal, as it doesn't really solve the problem + # (electron loading system openssl before we can load our embedded one) + # Quick summary: + # + # - build without publishing + # - unpack the .AppImage + # - download reported working libs from ubuntu mirrors, put it inside + # - re-pack the .AppImage + # - checksum stuff + # - upload to gh + + runJob \ + "DEBUG=electron-builder electron-builder build --publish never" \ + "building and packaging app..." \ + "app built and packaged successfully" \ + "failed to build app" \ + "verbose" + + runJob \ + "scripts/patch-appimage.sh" \ + "patching AppImage..." \ + "AppImage patched successfully" \ + "failed to patch AppImage" + + LEDGER_LIVE_VERSION=$(grep version package.json | sed -E 's/.*: "(.*)",/\1/g') + + scripts/upload-github-release-asset.sh \ + github_api_token="$GH_TOKEN" \ + owner=LedgerHQ \ + repo=ledger-live-desktop \ + tag="$GH_TAG" \ + filename="dist/ledger-live-desktop-$LEDGER_LIVE_VERSION-linux-x86_64.AppImage" + + scripts/upload-github-release-asset.sh \ + github_api_token="$GH_TOKEN" \ + owner=LedgerHQ \ + repo=ledger-live-desktop \ + tag="$GH_TAG" \ + filename="dist/latest-linux.yml" + +else + runJob \ + "DEBUG=electron-builder electron-builder build --publish always" \ + "building and packaging app..." \ + "app built and packaged successfully" \ + "failed to build app" \ + "verbose" +fi