Fix surrealdb-core dependency patching (#3707)
This commit is contained in:
parent
eb01bfd293
commit
0728afd60c
3 changed files with 8 additions and 8 deletions
2
.github/workflows/beta.yml
vendored
2
.github/workflows/beta.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/patch.yml
vendored
2
.github/workflows/patch.yml
vendored
|
@ -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
|
||||
|
|
12
.github/workflows/reusable_publish_version.yml
vendored
12
.github/workflows/reusable_publish_version.yml
vendored
|
@ -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' }}
|
||||
|
|
Loading…
Reference in a new issue