Skip to content

Commit baea075

Browse files
authored
ci: fix version bumping GitHub Actions job
examples were placed in the `examples` directory in #482 but this change was missed, so there's no longer automatic version bumping that might be contributing to the crates.io releases being behind
1 parent 4333caa commit baea075

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/update-toml-version.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ jobs:
3333
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-2/Cargo.toml
3434
sed -i "s/^\(llama-cpp-sys-2 = { path = \"\.\.\/llama-cpp-sys-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" llama-cpp-2/Cargo.toml
3535
# Update the version in the simple Cargo.toml
36-
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" simple/Cargo.toml
37-
sed -i "s/^\(llama-cpp-2 = { path = \"\.\.\/llama-cpp-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" simple/Cargo.toml
36+
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" examples/simple/Cargo.toml
37+
sed -i "s/^\(llama-cpp-2 = { path = \"\.\.\/llama-cpp-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" examples/simple/Cargo.toml
3838
# Update the version in the root embeddings Cargo.toml
39-
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" embeddings/Cargo.toml
40-
sed -i "s/^\(llama-cpp-2 = { path = \"\.\.\/llama-cpp-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" embeddings/Cargo.toml
39+
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" examples/embeddings/Cargo.toml
40+
sed -i "s/^\(llama-cpp-2 = { path = \"\.\.\/llama-cpp-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" examples/embeddings/Cargo.toml
4141
# Update Cargo.lock by running cargo check
4242
cargo check
4343
# Commit the changes
4444
git config --global user.email "[email protected]"
4545
git config --global user.name "GitHub Actions"
46-
git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml simple/Cargo.toml embeddings/Cargo.toml Cargo.lock
46+
git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml examples/simple/Cargo.toml examples/embeddings/Cargo.toml Cargo.lock
4747
git commit -m "Bump version to $NEXT_VERSION [skip ci]"
4848
# Create a branch for the changes
4949
git checkout -b version-bump-$NEXT_VERSION

0 commit comments

Comments
 (0)