1
0

refactor: upload without brewing

This commit is contained in:
GenZmeY 2022-01-24 06:22:17 +03:00
parent 57df5705d4
commit f8e5904949

36
builder
View File

@ -309,8 +309,8 @@ function brew_cleanup ()
find "$MutSource/$Package" -type f -name '*.upk' -printf "%f\n" | xargs -I{} find "$KFPublishBrewedPC" -type f -name {} -delete
fi
done
rm -f "$KFPublishBrewedPC"/*.tmp
find "$KFPublishBrewedPC" -type d -empty -delete
}
function brew ()
@ -338,6 +338,8 @@ function brew ()
publish_common
brew_cleanup
find "$KFPublishBrewedPC" -type d -empty -delete
}
function brew_manual ()
@ -366,6 +368,24 @@ function brew_manual ()
done
publish_common
find "$KFPublishBrewedPC" -type d -empty -delete
}
# Uploading without brewing
function publish_unpublished ()
{
mkdir -p "$KFPublishBrewedPC" "$KFPublishScript" "$KFPublishPackages"
for Package in $PackageUpload
do
cp -f "$KFUnpublishScript/$Package.u" "$KFPublishScript"
find "$MutSource/$Package" -type f -name '*.upk' -exec cp -f {} "$KFPublishPackages" \;
done
publish_common
find "$KFPublishBrewedPC" -type d -empty -delete
}
function upload ()
@ -380,20 +400,10 @@ function upload ()
fi
if ! [[ -d "$KFPublish" ]]; then
echo "Warn: uploading without brewing"
mkdir -p "$KFPublishBrewedPC" "$KFPublishScript"
for Package in $PackageUpload
do
cp -f "$KFUnpublishScript/$Package.u" "$KFPublishScript"
done
if [[ -d "$KFUnpublishPackages" ]]; then
cp -rf "$KFUnpublishPackages" "$KFPublishPackages"
publish_unpublished
fi
publish_common
fi
find "$KFPublishBrewedPC" -type d -empty -delete
PreparedWsDir=$(mktemp -d -u -p "$KFDoc")