mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-23 13:15:51 +00:00
fix: Make update-libxrpl-version work with lockfile (#2249)
This commit is contained in:
28
.github/scripts/update-libxrpl-version
vendored
28
.github/scripts/update-libxrpl-version
vendored
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Note: This script is intended to be run from the root of the repository.
|
|
||||||
#
|
|
||||||
# This script modifies conanfile.py such that the specified version of libXRPL is used.
|
|
||||||
|
|
||||||
if [[ -z "$1" ]]; then
|
|
||||||
cat <<EOF
|
|
||||||
|
|
||||||
ERROR
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
Version should be passed as first argument to the script.
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
GNU_SED=$(sed --version 2>&1 | grep -q 'GNU' && echo true || echo false)
|
|
||||||
|
|
||||||
echo "+ Updating required libXRPL version to $VERSION"
|
|
||||||
|
|
||||||
if [[ "$GNU_SED" == "false" ]]; then
|
|
||||||
sed -i '' -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/$VERSION'|g" conanfile.py
|
|
||||||
else
|
|
||||||
sed -i -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/$VERSION'|g" conanfile.py
|
|
||||||
fi
|
|
||||||
8
.github/workflows/check_libxrpl.yml
vendored
8
.github/workflows/check_libxrpl.yml
vendored
@@ -27,7 +27,13 @@ jobs:
|
|||||||
- name: Update libXRPL version requirement
|
- name: Update libXRPL version requirement
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
./.github/scripts/update-libxrpl-version ${{ github.event.client_payload.version }}
|
sed -i.bak -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/${{ github.event.client_payload.version }}'|g" conanfile.py
|
||||||
|
rm -f conanfile.py.bak
|
||||||
|
|
||||||
|
- name: Update conan lockfile
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan lock create . -o '&:tests=True' -o '&:benchmark=True'
|
||||||
|
|
||||||
- name: Prepare runner
|
- name: Prepare runner
|
||||||
uses: ./.github/actions/prepare_runner
|
uses: ./.github/actions/prepare_runner
|
||||||
|
|||||||
Reference in New Issue
Block a user