Skip to content

Commit ddad772

Browse files
authored
Merge pull request #179 from utilityai/toml-v-update-fix
Toml version update fix
2 parents 79dafe1 + 37bdf7e commit ddad772

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
19+
with:
20+
submodules: recursive
1921

2022
- name: Update version in TOML files
2123
env:
@@ -29,14 +31,23 @@ jobs:
2931
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-sys-2/Cargo.toml
3032
# Update version in llama-cpp-2 Cargo.toml
3133
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-2/Cargo.toml
32-
sed -i "s/^\(llama-cpp-sys-2 = { path = \"\.\.\/llama-cpp-sys-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" llama-cpp-2/Cargo.toml
34+
sed -i "s/^\(llama-cpp-sys-2 = { path = \"\.\.\/llama-cpp-sys-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" llama-cpp-2/Cargo.toml
35+
# 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
38+
# 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
41+
# Update Cargo.lock by running cargo check
42+
cargo check
3343
# Commit the changes
3444
git config --global user.email "[email protected]"
3545
git config --global user.name "GitHub Actions"
36-
git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml
46+
git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml simple/Cargo.toml embeddings/Cargo.toml Cargo.lock
3747
git commit -m "Bump version to $NEXT_VERSION [skip ci]"
38-
# Create a branch for the changes
48+
# Create a branch for the changes
3949
git checkout -b version-bump-$NEXT_VERSION
4050
# Push the changes and create a pull request
4151
git push origin version-bump-$NEXT_VERSION --force
42-
gh pr create --base main --head version-bump-$NEXT_VERSION --title "Bump version to $NEXT_VERSION" --fill
52+
gh pr create --base main --head version-bump-$NEXT_VERSION --title "Bumped version to $NEXT_VERSION" --fill
53+

0 commit comments

Comments
 (0)