diff --git a/.ci-scripts/ci-rizin-dl.py b/.ci-scripts/ci-rizin-dl.py index 15164bc..536a0fd 100644 --- a/.ci-scripts/ci-rizin-dl.py +++ b/.ci-scripts/ci-rizin-dl.py @@ -3,12 +3,9 @@ import sys import os -file_name = sys.argv[1] -latest = "master" if len(sys.argv) < 2 else sys.argv[2] +out_file = "rizin.zip" -_, file_extension = os.path.splitext(file_name) -out_file = f"rizin{file_extension}" -print(file_name, out_file) +latest = "master" if len(sys.argv) < 1 else sys.argv[1] if latest != "dev": # master branch always build against latest release of rizin @@ -16,7 +13,7 @@ with urllib.request.urlopen('https://api.github.com/repos/rizinorg/rizin/tags?per_page=1') as f: tags = json.load(f) latest = tags[0]['name'] - url = f"https://github.com/rizinorg/rizin/releases/download/{latest}/rizin-src-{latest}" + url = f"https://github.com/rizinorg/rizin/archive/refs/tags/{latest}.zip" else: # dev branch always build against latest commit of rizin url = "https://github.com/rizinorg/rizin/archive/refs/heads/dev.zip" diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index ec46757..7840b01 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -52,20 +52,15 @@ jobs: run: | WORKDIR="$PWD" cd .. - python "$WORKDIR/.ci-scripts/ci-rizin-dl.py" 'rizin-${{ matrix.release }}-{version}.zip' '${{ github.event.pull_request.base.ref || github.ref_name }}' + python "$WORKDIR/.ci-scripts/ci-rizin-dl.py" '${{ github.event.pull_request.base.ref || github.ref_name }}' unzip -q rizin.zip rm *.zip mv rizin* rizin-build - cd "$WORKDIR" - - name: Build rizin - shell: pwsh - run: | cd rizin-build - .\dist\windows\build_windows_installer.ps1 'vs2019_static' '64' '--default-library=static -Db_vscrt=static_from_buildtype -Dportable=true' - ls .\dist\windows\Output\ - - name: Install rizin.exe - shell: pwsh - run: Start-Process -Wait -FilePath .\dist\windows\Output\rizin.exe -ArgumentList "/SP- /SILENT /CURRENTUSER" -PassThru + powershell.exe ".\dist\windows\build_windows_installer.ps1 vs2019_static 64 --default-library=static -Db_vscrt=static_from_buildtype -Dportable=true" + ls ./dist/windows/Output + powershell.exe '.\dist\windows\Output\rizin.exe /SP- /SILENT /CURRENTUSER' + cd "$WORKDIR" - name: Build & run the plugin shell: pwsh run: .ci-scripts\ci-build-win.ps1 64