diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index bb179b0..6d76f6e 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -65,7 +65,7 @@ jobs: uses: actions/create-release@v1 id: createRelease env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: '${{ needs.check_version.outputs.LATEST_VERSION }}' release_name: '${{ needs.check_version.outputs.LATEST_VERSION }}' @@ -81,26 +81,20 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 with: - python-version: '3.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax - architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + python-version: '3.8' + architecture: 'x64' - name: install dependencies run: | - sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install innoextract cmake zip -y + sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install innoextract radare2 zip -y python3 -m pip install r2pipe loguru - - - name: build radare2 - shell: bash - run: | - git clone https://github.com/radareorg/radare2 - radare2/sys/install.sh - name: patch version - run: | python3 auto-analysis/patch.py - zip -rj auto-analysis/win/x64/build/typoraCracker.zip auto-analysis/win/x64/build/* - zip -rj auto-analysis/win/x86/build/typoraCracker.zip auto-analysis/win/x86/build/* - zip -rj auto-analysis/linux/x64/build/typoraCracker.zip auto-analysis/linux/x64/build/* + + zip -rjq auto-analysis/win/x64/build/typoraCracker.zip auto-analysis/win/x64/build/* + zip -rjq auto-analysis/win/x86/build/typoraCracker.zip auto-analysis/win/x86/build/* + zip -rjq auto-analysis/linux/x64/build/typoraCracker.zip auto-analysis/linux/x64/build/* - name: Check release version id: checkReleaseVersion diff --git a/auto-analysis/utils.py b/auto-analysis/utils.py index f5c981a..279c34c 100644 --- a/auto-analysis/utils.py +++ b/auto-analysis/utils.py @@ -11,7 +11,6 @@ import subprocess import json import os - BASE_DIR = os.path.dirname(__file__) @@ -23,12 +22,12 @@ def get_version(to_path): def download_file(from_link, to_path): - subprocess.check_call(["wget", from_link, "-O", to_path]) + subprocess.check_call(["wget", "-q", from_link, "-O", to_path]) def extract_file(from_path, to_path): if from_path.endswith(".exe"): - subprocess.check_call(["innoextract", from_path, "-d", to_path]) + subprocess.check_call(["innoextract", "-q", from_path, "-d", to_path]) elif from_path.endswith(".tar.gz"): subprocess.check_call(["tar", "-zxvf", from_path, "-C", to_path]) @@ -48,7 +47,6 @@ def patch_file(_key, _iv, to_dir): def scheduler(func, basedir, link, root_path): - download_path = os.path.join(basedir, os.path.basename(link)) log.info(f"downloading from {link}") download_file(link, download_path)