Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions release/kokoro/release_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

set -e

if ! command -v pip3 &> /dev/null || ! command -v curl &> /dev/null || ! command -v docker &> /dev/null; then
if ! command -v pip3 &> /dev/null || ! command -v curl &> /dev/null || ! command -v docker &> /dev/null || ! command -v git &> /dev/null; then
echo "Installing basic dependencies..."
apt-get update && apt-get install -y python3-pip curl
apt-get update && apt-get install -y python3-pip curl git

if ! command -v docker &> /dev/null; then
echo "Installing docker CLI..."
Expand Down
75 changes: 42 additions & 33 deletions release/kokoro/release_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,51 @@ echo Created temporary directories: %REPO_DIR%, %TMP_DIR%
mkdir "%TMP_DIR%"

echo --- Resolving Repository Source ---
if "%DRY_RUN%" == "true" (
echo [DRY RUN] Using local Kokoro clone instead of cloning main.
set "SRC_DIR=%~dp0..\.."
pushd "!SRC_DIR!"
for /f "tokens=*" %%i in ('git tag --sort=-v:refname 2^>nul') do (
set "VERSION=%%i"
goto :got_local_tag
)
set "VERSION=0.1.2"
:got_local_tag
if "%DRY_RUN%" == "true" goto resolution_dry
goto resolution_real

:resolution_dry
echo [DRY RUN] Using local Kokoro clone instead of cloning main.
set "SRC_DIR=%~dp0..\.."
pushd "!SRC_DIR!"
set "VERSION="
for /f "tokens=*" %%i in ('git tag --sort=-v:refname 2^>nul') do (
set "VERSION=%%i"
goto got_local_tag
)
:got_local_tag
if "%VERSION%" == "" set "VERSION=0.1.2"
popd
goto resolution_done

:resolution_real
mkdir "%REPO_DIR%"
pushd "%REPO_DIR%"
git clone https://github.com/cel-expr/cel-python.git
if !ERRORLEVEL! NEQ 0 (
echo Failed to clone repository!
set "RELEASE_STATUS=1"
popd
) else (
mkdir "%REPO_DIR%"
pushd "%REPO_DIR%"
git clone https://github.com/cel-expr/cel-python.git
if !ERRORLEVEL! NEQ 0 (
echo Failed to clone repository!
set "RELEASE_STATUS=1"
popd
goto cleanup
)
cd cel-python
for /f "tokens=*" %%i in ('git tag --sort=-v:refname') do (
set "VERSION=%%i"
goto :got_tag
)
:got_tag
if "%VERSION%" == "" (
echo Failed to get version tag!
set "RELEASE_STATUS=1"
popd
goto cleanup
)
set "SRC_DIR=%REPO_DIR%\cel-python"
goto cleanup
)
cd cel-python
set "VERSION="
for /f "tokens=*" %%i in ('git tag --sort=-v:refname') do (
set "VERSION=%%i"
goto got_tag
)
:got_tag
if "%VERSION%" == "" (
echo Failed to get version tag!
set "RELEASE_STATUS=1"
popd
goto cleanup
)
set "SRC_DIR=%REPO_DIR%\cel-python"
popd
goto resolution_done

:resolution_done

if "%VERSION:~0,1%" == "v" (
set "VERSION=%VERSION:~1%"
Expand Down
Loading