Skip to content

Commit

Permalink
[Amir] cascading version bump to bodhicore, helps bodhi -V give the…
Browse files Browse the repository at this point in the history
… right result
  • Loading branch information
anagri committed Jun 14, 2024
1 parent ce6a5c5 commit f40207c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ jobs:
- name: build llama-server-bindings
run: |
cargo build -p llama-server-bindings --target ${{ matrix.target }}
- name: Set the Cargo.toml version in bodhicore
working-directory: bodhicore
run: |
sed -i.bak "s|^version = .*|version = \"${{ env.VERSION }}\"|" Cargo.toml
rm Cargo.toml.bak
- name: Set the Cargo.toml version in app/bodhi
working-directory: app/bodhi
run: |
Expand Down Expand Up @@ -144,21 +149,32 @@ jobs:
with:
access_token: ${{ secrets.GH_PAT }}
artifact_paths: ${{ steps.tauri-action.outputs.artifactPaths }}
- name: Bump up minor version in app/bodhi/Cargo.toml
- name: Find the next version
if: env.TAG_BUILD == 'false'
working-directory: app/bodhi
run: |
NEXT_VERSION=$(echo ${{ env.VERSION }} | awk -F. '{$3 = $3 + 1; print}' OFS=.)
NEXT_VERSION="${NEXT_VERSION}-dev"
sed -i.bak "s|^version = .*|version = \"${NEXT_VERSION}\"|" Cargo.toml
echo NEXT_VERSION=${NEXT_VERSION} >> $GITHUB_ENV
- name: Bump up minor version in app/bodhi/Cargo.toml
if: env.TAG_BUILD == 'false'
working-directory: app/bodhi
run: |
sed -i.bak "s|^version = .*|version = \"${{ env.NEXT_VERSION }}\"|" Cargo.toml
rm Cargo.toml.bak
- name: Bump up minor version in bodhicore/Cargo.toml
if: env.TAG_BUILD == 'false'
working-directory: bodhicore
run: |
sed -i.bak "s|^version = .*|version = \"${{ env.NEXT_VERSION }}\"|" Cargo.toml
rm Cargo.toml.bak
- name: Commit and push changes
if: env.TAG_BUILD == 'false'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add app/bodhi/Cargo.toml
git commit -m "[Github Bot] Bump up minor version to ${VERSION}-dev\nurl: ${{ env.RUN_URL }}"
git add app/bodhi/Cargo.toml bodhicore/Cargo.toml
git commit -m "[Github Bot] Bump up minor version to ${VERSION}-dev, url: ${{ env.RUN_URL }}"
- name: Update update.json for aarch64-apple-darwin
if: matrix.target == 'aarch64-apple-darwin' && env.TAG_BUILD == 'false'
run: |
Expand All @@ -176,7 +192,7 @@ jobs:
# Commit and push the updated update.json file
git add update.json
git commit -m "[Github Bot][${{ env.VERSION }}] Update update.json for aarch64-apple-darwin version\nurl: ${{ env.RUN_URL }}"
git commit -m "[Github Bot][${{ env.VERSION }}] Update update.json for aarch64-apple-darwin version, url: ${{ env.RUN_URL }}"
- name: Push the changes
if: env.TAG_BUILD == 'false'
run: |
Expand Down
2 changes: 1 addition & 1 deletion app/bodhi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom-protocol = ["tauri/custom-protocol"]

[dependencies]
axum = "0.7.5"
bodhicore = { version = "0.1.0", path = "../../bodhicore" }
bodhicore = { path = "../../bodhicore" }
clap = { version = "4.5.2", features = ["derive"] }
dotenv = "0.15.0"
futures-util = "0.3.30"
Expand Down
2 changes: 1 addition & 1 deletion bodhicore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bodhicore"
version = "0.1.0"
version = "0.0.10-dev"
edition = "2021"

[dependencies]
Expand Down

0 comments on commit f40207c

Please sign in to comment.