mirror of
https://github.com/imartinez/privateGPT.git
synced 2026-07-16 17:00:12 +00:00
chore: update post update release (#2235)
* chore: fix uv lock after update (cherry picked from commit29137d673e) * chore(docs): fix postupdate (cherry picked from commit 3a6fb0179a1183ed60b8ca28bdff248aa1358df4) * chore(docs): use node 24 (cherry picked from commit3c30538a32) * chore(build): copy version.txt (cherry picked from commitbb1ea2f1d6)
This commit is contained in:
5
.github/workflows/fern-check.yml
vendored
5
.github/workflows/fern-check.yml
vendored
@@ -14,6 +14,11 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Install Fern
|
||||
run: npm install -g fern-api
|
||||
|
||||
|
||||
30
.github/workflows/post-release-please.yml
vendored
30
.github/workflows/post-release-please.yml
vendored
@@ -36,6 +36,34 @@ jobs:
|
||||
run: |
|
||||
git config user.email "ci@zylon.ai"
|
||||
git config user.name "Zylon CI"
|
||||
git add docs/openapi/openapi.json
|
||||
git add fern/openapi/openapi.json
|
||||
git diff --staged --quiet || git commit -m "docs: update OpenAPI spec for ${{ steps.update-openapi.outputs.version }}"
|
||||
git push
|
||||
|
||||
update-uv-lock:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.head_ref == 'release-please--branches--main' || github.ref_name == 'release-please--branches--main'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref || github.ref_name }}
|
||||
token: ${{ secrets.PAT || github.token }}
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/workflows/actions/install_dependencies
|
||||
|
||||
- name: Refresh uv.lock
|
||||
id: update-uv-lock
|
||||
run: |
|
||||
version=$(cat version.txt)
|
||||
uv lock
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config user.email "ci@zylon.ai"
|
||||
git config user.name "Zylon CI"
|
||||
git add uv.lock
|
||||
git diff --staged --quiet || git commit -m "build: update uv.lock for ${{ steps.update-uv-lock.outputs.version }}"
|
||||
git push
|
||||
|
||||
2
.github/workflows/preview-docs.yml
vendored
2
.github/workflows/preview-docs.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
node-version: "24"
|
||||
|
||||
- name: Install Fern
|
||||
run: npm install -g fern-api
|
||||
|
||||
6
.github/workflows/publish-docs.yml
vendored
6
.github/workflows/publish-docs.yml
vendored
@@ -14,8 +14,10 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Download Fern
|
||||
run: npm install -g fern-api
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from importlib.metadata import PackageNotFoundError, version
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_version() -> str:
|
||||
with open("version.txt", "r+") as version_file:
|
||||
try:
|
||||
return version("private-gpt")
|
||||
except PackageNotFoundError:
|
||||
version_file = Path(__file__).resolve().parents[2] / "version.txt"
|
||||
try:
|
||||
release_version = version_file.read()
|
||||
version_file.close()
|
||||
return release_version
|
||||
except OSError as e:
|
||||
raise ImportError("Version file not found") from e
|
||||
return version_file.read_text(encoding="utf-8").strip()
|
||||
except OSError as exc:
|
||||
raise ImportError("Version metadata not found") from exc
|
||||
|
||||
@@ -348,6 +348,7 @@ packages = ["private_gpt"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.force-include]
|
||||
"settings.yaml" = "settings.yaml"
|
||||
"version.txt" = "version.txt"
|
||||
"ui" = "ui"
|
||||
"scripts" = "scripts"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user