From 537f42a30fe1608359c7dc9c63fde25853ad363b Mon Sep 17 00:00:00 2001 From: Bagatur Date: Wed, 12 Mar 2025 04:32:53 -0700 Subject: [PATCH] fix release notes --- .github/workflows/_release.yml | 34 +++++++++++++++++++++++++--------- libs/partners/openai/uv.lock | 3 ++- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 982d9c30be1..e94a4d7075f 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -100,15 +100,32 @@ jobs: PKG_NAME: ${{ needs.build.outputs.pkg-name }} VERSION: ${{ needs.build.outputs.version }} run: | - PREV_TAG="$PKG_NAME==${VERSION%.*}.$(( ${VERSION##*.} - 1 ))"; [[ "${VERSION##*.}" -eq 0 ]] && PREV_TAG="" + # Handle regular versions and pre-release versions differently + if [[ "$VERSION" == *"-"* ]]; then + # This is a pre-release version (contains a hyphen) + # Extract the base version without the pre-release suffix + BASE_VERSION=${VERSION%%-*} + # Look for the latest release of the same base version + REGEX="^$PKG_NAME==$BASE_VERSION\$" + PREV_TAG=$(git tag --sort=-creatordate | (grep -P "$REGEX" || true) | head -1) + + # If no exact base version match, look for the latest release of any kind + if [ -z "$PREV_TAG" ]; then + REGEX="^$PKG_NAME==\\d+\\.\\d+\\.\\d+\$" + PREV_TAG=$(git tag --sort=-creatordate | (grep -P "$REGEX" || true) | head -1) + fi + else + # Regular version handling + PREV_TAG="$PKG_NAME==${VERSION%.*}.$(( ${VERSION##*.} - 1 ))"; [[ "${VERSION##*.}" -eq 0 ]] && PREV_TAG="" - # backup case if releasing e.g. 0.3.0, looks up last release - # note if last release (chronologically) was e.g. 0.1.47 it will get - # that instead of the last 0.2 release - if [ -z "$PREV_TAG" ]; then - REGEX="^$PKG_NAME==\\d+\\.\\d+\\.\\d+\$" - echo $REGEX - PREV_TAG=$(git tag --sort=-creatordate | (grep -P $REGEX || true) | head -1) + # backup case if releasing e.g. 0.3.0, looks up last release + # note if last release (chronologically) was e.g. 0.1.47 it will get + # that instead of the last 0.2 release + if [ -z "$PREV_TAG" ]; then + REGEX="^$PKG_NAME==\\d+\\.\\d+\\.\\d+\$" + echo $REGEX + PREV_TAG=$(git tag --sort=-creatordate | (grep -P $REGEX || true) | head -1) + fi fi # if PREV_TAG is empty, let it be empty @@ -121,7 +138,6 @@ jobs: echo "Previous tag $PREV_TAG not found in git repo" exit 1 fi - fi TAG="${PKG_NAME}==${VERSION}" diff --git a/libs/partners/openai/uv.lock b/libs/partners/openai/uv.lock index c3e5aead01d..82aaa9b072e 100644 --- a/libs/partners/openai/uv.lock +++ b/libs/partners/openai/uv.lock @@ -1,4 +1,5 @@ version = 1 +revision = 1 requires-python = ">=3.9, <4.0" resolution-markers = [ "python_full_version >= '3.12.4'", @@ -462,7 +463,7 @@ wheels = [ [[package]] name = "langchain-core" -version = "0.3.43" +version = "0.3.45rc1" source = { editable = "../../core" } dependencies = [ { name = "jsonpatch" },