From ecd41f7db3837267abc8c186d5ff5eef14df72a2 Mon Sep 17 00:00:00 2001 From: XelXen <78258352+XelXen@users.noreply.github.com> Date: Sat, 17 Sep 2022 23:37:44 +0530 Subject: [PATCH] Fix Collecting Shell Output --- .github/pkg.py | 14 +++++++++----- .github/workflows/tg-bot.yml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/pkg.py b/.github/pkg.py index 7cc4fc63d..b52625542 100644 --- a/.github/pkg.py +++ b/.github/pkg.py @@ -1,25 +1,29 @@ -import subprocess +import os while True: - outputStr = subprocess.call("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-x86-debug.apk --output ~/app-x86-debug.apk", shell=True) + os.system("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-x86-debug.apk --output app-x86-debug.apk") + outputStr = open("app-x86-debug.apk","r").read() if "Not Found" not in outputStr: print("Build [x86] Downloaded") break while True: - outputStr = subprocess.call("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-x86_64-debug.apk --output ~/app-x86_64-debug.apk", shell=True) + os.system("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-x86_64-debug.apk --output app-x86_64-debug.apk") + outputStr = open("app-x86_64-debug.apk","r").read() if "Not Found" not in outputStr: print("Build [x86_64] Downloaded") break while True: - outputStr = subprocess.call("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-armeabi-v7a-debug.apk --output ~/app-armeabi-v7a-debug.apk", shell=True) + os.system("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-armeabi-v7a-debug.apk --output app-armeabi-v7a-debug.apk") + outputStr = open("app-armeabi-v7a-debug.apk","r").read() if "Not Found" not in outputStr: print("Build [arm7] Downloaded") break while True: - outputStr = subprocess.call("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-armeabi-v8a-debug.apk --output ~/app-armeabi-v8a-debug.apk", shell=True) + os.system("curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/latestBuild/app-armeabi-v8a-debug.apk --output app-armeabi-v8a-debug.apk") + outputStr = open("app-armeabi-v8a-debug.apk","r").read() if "Not Found" not in outputStr: print("Build [arm8] Downloaded") break \ No newline at end of file diff --git a/.github/workflows/tg-bot.yml b/.github/workflows/tg-bot.yml index 6a911834b..2dbf46704 100644 --- a/.github/workflows/tg-bot.yml +++ b/.github/workflows/tg-bot.yml @@ -28,7 +28,7 @@ jobs: - name: Download packages run: | - cd .github + cd ~ python pkg.py cd ..