From 34920a5e59c7f192ce1a09b472e08181de323a41 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Mon, 2 Mar 2020 21:13:20 -0700 Subject: [PATCH] Embed app.hex into installer --- .travis.yml | 2 +- host.mk | 10 ++++++---- load-template.sh => install-template.sh | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) rename load-template.sh => install-template.sh (88%) diff --git a/.travis.yml b/.travis.yml index 569ab2fe..30e48b5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ deploy: - provider: releases skip_cleanup: true file: - - solana-ledger-app.tar.gz + - install.sh api_key: secure: PL336gAG73GcuxkvZDvRaBtKYyv4Oc7aOj8PlMkh4YrOcnjkTWhBsVZqx9u4vvFX8CIBWc4a9mVY3vHRk2w9ygUF9eo/Gwked7MN444SGLx1vcK+ojkiKv5FON2UQk3D9AnTQ6eLUYLQgGIOr0hN+UXVW36iZ8CGN84Ei2wzeyqRv24DeZel5spvY7Nt8X8KAhGGoenQlKAYxXc8UgTyOLlmVAwLEgMZYsuc8ju8q+JuwxJYFrZidWmXts6StfJ3nuB8j4OQnTvHWUs6gtFMk0phazmYWUOjeHyzORIOcyXT2KNSCux9F4sV0j0n+53lgeLID/SmLRtIwo8O6WSmmDeOwiqRFV0/DT1KdG4z2X/7y9VTIfmwQwy3xQjLnSczvlR3jXoNbDfd+R13srBFY13FXT+dAiGpp82nTWqwytkBeVjz/9pSWxiAFDF8B8cHCNIlRH+zTKr9VhUZNPSx9tPK3lftT+mUTJNt5a5Ksb5jy+/SX5HirtUgXTy3Ui8MrqpNiytz5wnb3mapIMsfy1ZBfjbYWXjrPZ5zVfuSVAWkPXRm3YSi4h5TZ8kaeag7LTl85D5im74vsQ442dnTGS71nOzkAcr8MXBO2nFOQw1jzBsXVrJFlLvHNwyN11VsBw210H9G4qibmVQPB5YZ2hleMN48/Bkj4MzHpTxFm94= on: diff --git a/host.mk b/host.mk index 09dd11db..979fb1fb 100644 --- a/host.mk +++ b/host.mk @@ -19,11 +19,13 @@ delete: python3 -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS) release: + @echo "#!/usr/bin/env bash" > install.sh + @echo "mkdir -p bin && cat <> bin/app.hex" >> install.sh + @cat bin/app.hex >> install.sh + @echo "EOF" >> install.sh export APP_LOAD_PARAMS_EVALUATED="$(shell printf '\\"%s\\" ' $(APP_LOAD_PARAMS))"; \ - cat load-template.sh | envsubst > load.sh - chmod +x load.sh - tar -zcf solana-ledger-app.tar.gz load.sh bin/app.hex - rm load.sh + cat install-template.sh | envsubst >> install.sh + chmod +x install.sh deps: python3 -mpip install ledgerblue diff --git a/load-template.sh b/install-template.sh similarity index 88% rename from load-template.sh rename to install-template.sh index a23eeb62..b1fd53e5 100644 --- a/load-template.sh +++ b/install-template.sh @@ -1,3 +1,4 @@ python3 -m venv ledger-env ledger-env/bin/pip3 install ledgerblue ledger-env/bin/python3 -m ledgerblue.loadApp $APP_LOAD_PARAMS_EVALUATED +rm -rf ledger-env