Update workflows to take core v2 into consideration (#3701)
This commit is contained in:
parent
948b9640fb
commit
05f78ee145
6 changed files with 24 additions and 16 deletions
9
.github/workflows/beta.yml
vendored
9
.github/workflows/beta.yml
vendored
|
@ -87,6 +87,7 @@ jobs:
|
|||
|
||||
# Retrieve just released version
|
||||
betaVersion=$(taplo get -f Cargo.toml "package.version")
|
||||
echo "current-version=${betaVersion}" >> $GITHUB_OUTPUT
|
||||
major=$(echo $betaVersion | tr "." "\n" | sed -n 1p)
|
||||
minor=$(echo $betaVersion | tr "." "\n" | sed -n 2p)
|
||||
betaNum=$(echo $betaVersion | tr "." "\n" | sed -n 4p)
|
||||
|
@ -109,7 +110,10 @@ jobs:
|
|||
# Bump the crate version
|
||||
sed -i "s#^version = \".*\"#version = \"${{ steps.bump.outputs.version }}\"#" Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${{ steps.bump.outputs.version }}\"#" lib/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${{ steps.bump.outputs.version }}\"#" core/Cargo.toml
|
||||
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
|
||||
|
||||
# Update Cargo.lock without updating dependency versions
|
||||
cargo check --no-default-features --features storage-mem
|
||||
|
@ -130,7 +134,7 @@ jobs:
|
|||
if: ${{ steps.bump.outputs.beta-num == '1' }}
|
||||
id: pr
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
|
||||
run: |
|
||||
set -x
|
||||
url=$(gh pr create --base main --title "Bump version to v${{ steps.bump.outputs.version }}" --body "Update main version")
|
||||
|
@ -142,5 +146,4 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} # Need the custom user token here so we can approve and merge the PR
|
||||
run: |
|
||||
set -x
|
||||
gh pr review ${{ steps.pr.outputs.url }} --approve
|
||||
gh pr merge ${{ steps.pr.outputs.url }} --delete-branch --admin --squash
|
||||
|
|
5
.github/workflows/patch.yml
vendored
5
.github/workflows/patch.yml
vendored
|
@ -65,6 +65,11 @@ jobs:
|
|||
|
||||
# Bump the crate version
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
|
||||
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
|
||||
|
||||
# Update Cargo.lock without updating dependency versions
|
||||
cargo check --no-default-features --features storage-mem
|
||||
|
|
18
.github/workflows/reusable_publish_version.yml
vendored
18
.github/workflows/reusable_publish_version.yml
vendored
|
@ -102,11 +102,11 @@ jobs:
|
|||
# Bump the crate version
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" core/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"2.0.0-${version}\"#" core/Cargo.toml
|
||||
|
||||
# Update dependency versions
|
||||
sed -i "s#surrealdb = { version = \"=${currentVersion}\"#surrealdb = { version = \"${major}\"#" Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"=${currentVersion}\"#surrealdb-core = { version = \"${major}\"#" lib/Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { 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 = \"=${currentVersion}\"#surrealdb-core = { version = \"=${betaVersion}\"#" lib/Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
|
||||
else
|
||||
git checkout -b releases/beta
|
||||
major=$(echo $currentVersion | tr "." "\n" | sed -n 1p)
|
||||
|
@ -149,13 +149,13 @@ jobs:
|
|||
|
||||
# Update dependency versions
|
||||
sed -i "s#surrealdb = { version = \"${major}\"#surrealdb = { version = \"=${betaVersion}\"#" Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"${major}\"#surrealdb-core = { version = \"=${betaVersion}\"#" lib/Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"=2.0.0-${currentVersion}\"#surrealdb-core = { version = \"=2.0.0-${betaVersion}\"#" lib/Cargo.toml
|
||||
fi
|
||||
|
||||
# Bump the crate version
|
||||
sed -i "s#^version = \".*\"#version = \"${betaVersion}\"#" Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${betaVersion}\"#" lib/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${betaVersion}\"#" core/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"2.0.0-${betaVersion}\"#" core/Cargo.toml
|
||||
|
||||
# Update Cargo.lock without updating dependency versions
|
||||
cargo check --no-default-features --features storage-mem
|
||||
|
@ -593,8 +593,8 @@ jobs:
|
|||
|
||||
# Update crate version
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" core/Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"=${currentVersion}\"#surrealdb-core = { 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
|
||||
|
||||
- name: Patch nightly crate version
|
||||
if: ${{ inputs.environment == 'nightly' }}
|
||||
|
@ -611,8 +611,8 @@ jobs:
|
|||
|
||||
# Update the version to a nightly one
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" lib/Cargo.toml
|
||||
sed -i "s#^version = \".*\"#version = \"${version}\"#" core/Cargo.toml
|
||||
sed -i "s#surrealdb-core = { version = \"${major}\"#surrealdb-core = { 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
|
||||
|
||||
- name: Patch crate name and description
|
||||
if: ${{ inputs.environment == 'nightly' || inputs.environment == 'beta' }}
|
||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -5499,7 +5499,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"serial_test",
|
||||
"surrealdb-core 1.3.0",
|
||||
"surrealdb-core 2.0.0-alpha.4.0",
|
||||
"surrealdb-core 2.0.0-1.4.0",
|
||||
"temp-dir",
|
||||
"test-log",
|
||||
"thiserror",
|
||||
|
@ -5604,7 +5604,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "surrealdb-core"
|
||||
version = "2.0.0-alpha.4.0"
|
||||
version = "2.0.0-1.4.0"
|
||||
dependencies = [
|
||||
"addr",
|
||||
"any_ascii",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "surrealdb-core"
|
||||
publish = true
|
||||
edition = "2021"
|
||||
version = "2.0.0-alpha.4.0"
|
||||
version = "2.0.0-1.4.0"
|
||||
rust-version = "1.70.0"
|
||||
readme = "../lib/CARGO.md"
|
||||
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
|
||||
|
|
|
@ -99,7 +99,7 @@ semver = { version = "1.0.20", features = ["serde"] }
|
|||
serde = { version = "1.0.193", features = ["derive"] }
|
||||
serde_json = "1.0.108"
|
||||
surrealdb-core1 = { version = "1", default-features = false, package = "surrealdb-core" }
|
||||
surrealdb-core2 = { version = "=2.0.0-alpha.4.0", default-features = false, path = "../core", package = "surrealdb-core", optional = true }
|
||||
surrealdb-core2 = { version = "=2.0.0-1.4.0", default-features = false, path = "../core", package = "surrealdb-core", optional = true }
|
||||
thiserror = "1.0.50"
|
||||
tokio-util = { version = "0.7.10", optional = true, features = ["compat"] }
|
||||
tracing = "0.1.40"
|
||||
|
|
Loading…
Reference in a new issue