From 7d48e561a4546a7aa1801990fe5791ac538c7144 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sat, 8 Apr 2023 23:17:50 +0100 Subject: [PATCH 1/3] fix: pypi production build Fix pypi production build --- .github/workflows/publish-to-pypi.yml | 33 +++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index d4518ed..565884d 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -20,30 +20,29 @@ jobs: - name: Fetch gateway-mfr-rs env: - GATEWAY_MFR_RS_RELEASE: v0.3.2 + GATEWAY_MFR_RS_RELEASE: "0.4.1" run: | - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf-ecc608.tar.gz" - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf-ecc608.checksum" - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu-ecc608.tar.gz" - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu-ecc608.checksum" - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-unknown-linux-gnu-ecc608.tar.gz" - wget "https://github.com/helium/gateway-mfr-rs/releases/download/${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-unknown-linux-gnu-ecc608.checksum" - SHA256_ARM=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf-ecc608.tar.gz" | awk '{print $1}') - SHA256_AARCH64=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu-ecc608.tar.gz" | awk '{print $1}') - SHA256_X86_64=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-unknown-linux-gnu-ecc608.tar.gz" | awk '{print $1}') + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf.tar.gz" + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf.checksum" + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu.tar.gz" + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu.checksum" + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-tpm-debian-gnu.tar.gz" + wget "https://github.com/helium/gateway-mfr-rs/releases/download/v${GATEWAY_MFR_RS_RELEASE}/gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-tpm-debian-gnu.checksum" + SHA256_ARM=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf.tar.gz" | awk '{print $1}') + SHA256_AARCH64=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu.tar.gz" | awk '{print $1}') + SHA256_X86_64=$( shasum -a 256 "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-tpm-debian-gnu.tar.gz" | awk '{print $1}') echo "Generated checksum ARM: ${SHA256_ARM}" echo "Generated checksum AARCH64: ${SHA256_AARCH64}" echo "Generated checksum X86_64: ${SHA256_X86_64}" - # Verify the checksums - if grep -q "${SHA256_ARM}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf-ecc608.checksum" && grep -q "${SHA256_AARCH64}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu-ecc608.checksum" && grep -q "${SHA256_X86_64}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-unknown-linux-gnu-ecc608.checksum"; then + if grep -q "${SHA256_ARM}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf.checksum" && grep -q "${SHA256_AARCH64}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu.checksum" && grep -q "${SHA256_X86_64}" "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-tpm-debian-gnu.checksum"; then echo "Checksum verified for gateway_mfr. Unpacking tarball..." # Unpack the tarballs - tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf-ecc608.tar.gz" + tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-arm-unknown-linux-gnueabihf.tar.gz" mv gateway_mfr gateway_mfr_arm - tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu-ecc608.tar.gz" + tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-aarch64-unknown-linux-gnu.tar.gz" mv gateway_mfr gateway_mfr_aarch64 - tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-unknown-linux-gnu-ecc608.tar.gz" + tar -xvf "gateway-mfr-${GATEWAY_MFR_RS_RELEASE}-x86_64-tpm-debian-gnu.tar.gz" mv gateway_mfr gateway_mfr_x86_64 exit 0 else @@ -56,13 +55,13 @@ jobs: chmod +x gateway_mfr_arm chmod +x gateway_mfr_aarch64 chmod +x gateway_mfr_x86_64 - + - name: Move gateway_mfr in place run: | mv gateway_mfr_arm hm_pyhelper/gateway_mfr mv gateway_mfr_aarch64 hm_pyhelper/gateway_mfr_aarch64 mv gateway_mfr_x86_64 hm_pyhelper/gateway_mfr_x86_64 - + - name: Install pypa/build run: | python -m pip install build --user From 32be40a6acf99ed0d58b23603f5327f523db911c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sat, 8 Apr 2023 23:19:28 +0100 Subject: [PATCH 2/3] Update publish-to-pypi-test.yml --- .github/workflows/publish-to-pypi-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-pypi-test.yml b/.github/workflows/publish-to-pypi-test.yml index 648ff75..c95b045 100644 --- a/.github/workflows/publish-to-pypi-test.yml +++ b/.github/workflows/publish-to-pypi-test.yml @@ -78,4 +78,4 @@ jobs: with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/light-hotspot' + if: github.ref == 'refs/heads/master' From 993e8f4d6076ee1ad06a31061804d882d49348e4 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sat, 8 Apr 2023 23:20:11 +0100 Subject: [PATCH 3/3] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 12e580e..8c50a7f 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='hm_pyhelper', - version='0.14.2', + version='0.14.3', author="Nebra Ltd", author_email="support@nebra.com", description="Helium Python Helper",