Skip to content

Commit

Permalink
Merge pull request #6 from utilityai/sepehr455-patch-1
Browse files Browse the repository at this point in the history
Automated version update
  • Loading branch information
MarcusDunn authored Jan 2, 2024
2 parents 281d71f + 88562c7 commit c8d9096
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/update-toml-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update version in TOML files

on:
workflow_dispatch:

jobs:
modify_files:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Update version in TOML files
run: |
# Extract the current version from the TOML file
CURRENT_VERSION=$(awk -F '"' '/^version/ {print $2}' llama-cpp-2/Cargo.toml)
# Increment the version
NEXT_VERSION=$(echo "$CURRENT_VERSION" | awk -F. -v OFS=. '{++$NF; print}')
# Update version in llama-cpp-sys-2 Cargo.toml
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-sys-2/Cargo.toml
# Update version in llama-cpp-2 Cargo.toml
sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-2/Cargo.toml
- name: Upload modified files
uses: actions/upload-artifact@v2
with:
name: modified-files
path: llama-cpp-sys-2/Cargo.toml, llama-cpp-2/Cargo.toml

0 comments on commit c8d9096

Please sign in to comment.