Skip to content

Commit e36a7d9

Browse files
Daisuke NishimatsuDaisuke Nishimatsu
authored andcommitted
fix: update script to avoid skip existing issue
Signed-off-by: Daisuke Nishimatsu <daisuke@DaisukenoMacBook-Air.local>
1 parent 63722e5 commit e36a7d9

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

.scripts/build_unix.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,15 @@ for recipe in ${CURRENT_RECIPES[@]}; do
4848

4949
done
5050

51-
# Check if it build something, this is a hotfix for the skips inside additional_recipes
52-
if compgen -G "${CONDA_BLD_PATH}/${target}*/*.conda" > /dev/null; then
53-
pixi run upload "${CONDA_BLD_PATH}/${target}"*/*.conda --skip-existing
51+
# Check if it build something, this is a hotfix for the skips inside additional_recipes
52+
shopt -s nullglob
53+
conda_packages=( "${CONDA_BLD_PATH}/${target}"*/*.conda )
54+
if (( ${#conda_packages[@]} > 0 )); then
55+
# Upload packages one-by-one to avoid rattler-upload returning after the first
56+
# package skipped by --skip-existing.
57+
for conda_package in "${conda_packages[@]}"; do
58+
pixi run upload "${conda_package}" --skip-existing
59+
done
5460
else
5561
echo "Warning: No .conda files found in ${CONDA_BLD_PATH}/${target}"
5662
echo "This might be due to all the packages being skipped"

.scripts/build_win.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ for %%X in (%CURRENT_RECIPES%) do (
2828
:: Check if .conda files exist in the win-64 directory
2929
if exist "%CONDA_BLD_PATH%\win-64\*.conda" (
3030
echo Found .conda files, starting upload...
31+
rem Upload packages one-by-one to avoid rattler-upload returning after the first
32+
rem package skipped by --skip-existing.
3133
for %%F in ("%CONDA_BLD_PATH%\win-64\*.conda") do (
32-
echo Uploading %%F
33-
pixi run upload "%%F" --skip-existing
34+
echo Uploading %%~fF
35+
pixi run upload "%%~fF" --skip-existing
3436
if errorlevel 1 exit 1
3537
)
3638
) else (

0 commit comments

Comments
 (0)