Use github-output instead of set-output in the ci jobs

* This syntax will be deprecated the 1st of June 2023
This commit is contained in:
pancake 2022-11-10 10:42:11 +01:00 committed by pancake
parent fc63211df4
commit 936b940060
3 changed files with 15 additions and 10 deletions

View File

@ -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

View File

@ -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: |

View File

@ -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