Fix surrealdb-core dependency patching (#3707)

This commit is contained in:
Rushmore Mushambi 2024-03-18 11:30:18 +02:00 committed by GitHub
parent eb01bfd293
commit 0728afd60c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View file

@ -113,7 +113,7 @@ jobs:
sed -i "s#^version = \".*\"#version = \"2.0.0-${{ steps.bump.outputs.version }}\"#" core/Cargo.toml
# Update dependency versions
sed -i "s#surrealdb-core = { version = \"=2.0.0-${{ steps.bump.outputs.current-version }}\"#surrealdb-core = { version = \"=2.0.0-${{ steps.bump.outputs.core-version }}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${{ steps.bump.outputs.current-version }}\"#surrealdb-core2 = { version = \"=2.0.0-${{ steps.bump.outputs.core-version }}\"#" lib/Cargo.toml
# Update Cargo.lock without updating dependency versions
cargo check --no-default-features --features storage-mem

View file

@ -69,7 +69,7 @@ jobs:
sed -i "s#^version = \".*\"#version = \"2.0.0-${version}\"#" core/Cargo.toml
# Update dependency versions
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
# Update Cargo.lock without updating dependency versions
cargo check --no-default-features --features storage-mem

View file

@ -106,7 +106,7 @@ jobs:
# Update dependency versions
sed -i "s#surrealdb = { version = \"=${currentVersion}\"#surrealdb = { version = \"${major}\"#" Cargo.toml
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
# Update Cargo.lock without updating dependency versions
cargo check --no-default-features --features storage-mem
@ -140,7 +140,7 @@ jobs:
# Update dependency versions
sed -i "s#surrealdb = { version = \"=${currentVersion}\"#surrealdb = { version = \"=${betaVersion}\"#" Cargo.toml
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
else
git checkout -b releases/beta
major=$(echo $currentVersion | tr "." "\n" | sed -n 1p)
@ -149,7 +149,7 @@ jobs:
# Update dependency versions
sed -i "s#surrealdb = { version = \"${major}\"#surrealdb = { version = \"=${betaVersion}\"#" Cargo.toml
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
fi
# Bump the crate version
@ -594,12 +594,12 @@ jobs:
# Update crate version
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
sed -i "s#^version = \".*\"#version = \"2.0.0-${version}\"#" core/Cargo.toml
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
- name: Patch nightly crate version
if: ${{ inputs.environment == 'nightly' }}
run: |
# Get the date and time of the last commit
# Get the date of the last commit
date=$(git show --no-patch --format=%ad --date=format:%Y%m%d)
# Derive crate version
@ -612,7 +612,7 @@ jobs:
# Update the version to a nightly one
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
sed -i "s#^version = \".*\"#version = \"2.0.0-${version}\"#" core/Cargo.toml
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
sed -i "s#surrealdb-core2 = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core2 = { version = \"=2.0.0-${version}\"#" lib/Cargo.toml
- name: Patch crate name and description
if: ${{ inputs.environment == 'nightly' || inputs.environment == 'beta' }}