diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0140a2b9e..de89f0b268 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -299,7 +299,7 @@ jobs: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee pip install ninja r2pipe wget - name: Extract r2 version - run: echo "##[set-output name=branch;]$( cd sys;python version.py )" + run: echo "{branch}={`sys/version.py -n`}" >> $GITHUB_OUTPUT id: r2v - name: Build with meson + ninja shell: pwsh @@ -314,7 +314,7 @@ jobs: # repository: radareorg/radare2-win-installer # path: ./radare2-win-installer # - name: Extract r2 version -# run: echo "##[set-output name=branch;]$( python sys\\version.py )" +# run: echo "{branch}={`sys/version.py -n`}" >> $GITHUB_OUTPUT # id: extract_version # - name: Create installer # shell: pwsh @@ -393,7 +393,7 @@ jobs: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee pip install ninja r2pipe wget r2env - name: Extract r2 version - run: echo "##[set-output name=branch;]$( cd sys;python version.py )" + run: echo "{branch}={`sys/version.py -n`}" >> $GITHUB_OUTPUT id: r2v - name: Build with meson + ninja shell: cmd @@ -443,7 +443,7 @@ jobs: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee pip install ninja r2pipe wget - name: Extract r2 version - run: echo "##[set-output name=branch;]$( cd sys; python version.py )" + run: echo "{branch}={`sys/version.py -n`}" >> $GITHUB_OUTPUT id: r2v - name: Build with meson + ninja shell: pwsh @@ -536,7 +536,7 @@ jobs: with: fetch-depth: 0 # Download all git history and tags - name: Check if is a release - run: git describe --exact-match --tags ${{ github.sha }} | awk 'BEGIN{tag="-";r="no"}/^[0-9]+\.[0-9]+/{tag=$0;r="yes"};END{print "::set-output name=is::"r;print "::set-output name=tag::"tag}' + run: git describe --exact-match --tags ${{ github.sha }} | awk 'BEGIN{tag="-";r="no"}/^[0-9]+\.[0-9]+/{tag=$0;r="yes"};END{print "{is}={yes}";print "{tag}={${tag}}" >> $GITHUB_OUTPUT' id: release release: @@ -550,7 +550,7 @@ jobs: with: fetch-depth: 0 # Download all git history and tags - name: Extract r2 version - run: echo "##[set-output name=branch;]$( cd sys;python version.py )" + run: echo "{branch}={`sys/version.py -n`}" >> $GITHUB_OUTPUT id: r2v - name: Prepare release notes run: ./sys/release-notes.sh | tee ./RELEASE_NOTES.md diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index eb2c2fab3d..8d2d8eea2b 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -9,8 +9,7 @@ jobs: steps: - name: Determine current repository id: "determine-repo" - run: "echo \"::set-output name=repo::${GITHUB_REPOSITORY}\"" - + run: echo "{repo}={${GITHUB_REPOSITORY}}" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - name: Download Coverity Build Tool run: | diff --git a/sys/version.py b/sys/version.py index ec5572f4a4..2a436e1e1e 100755 --- a/sys/version.py +++ b/sys/version.py @@ -5,12 +5,15 @@ import sys full_version = False +no_newline = False for arg in sys.argv[1:]: if arg == '-h' or arg == '--help': print('Only flag accepted here is --full-version') sys.exit(0) - if arg == '--full-version': + elif arg == '-n': + no_newline = True + elif arg == '--full-version': full_version = True else: print('Option %s not supported' % (arg,)) @@ -20,7 +23,10 @@ r2root=os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) with open(os.path.join(r2root, 'configure.acr'), 'r') as f: f.readline() version = f.readline().split()[1] - sys.stdout.write(version + '\n') + if no_newline: + sys.stdout.write(version) + else: + sys.stdout.write(version + '\n') if full_version: versions = version.split('.') version_major = versions[0] if len(versions) > 0 else 0