Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Oct 13, 2024
1 parent 860b1d2 commit 3bc5dea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tools/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SUPPORTED_BLENDER_VERSIONS=(
)
SUPPORTED_UPBGE_VERSIONS=(
"0.2.5"
"0.30" "0.36"
"latest"
)

Expand Down Expand Up @@ -40,6 +41,8 @@ declare -A BLENDER_TAG_NAME=(
)
declare -A UPBGE_TAG_NAME=(
["v0.2.5"]="v0.2.5"
["v0.30"]="v0.30"
["v0.36"]="v0.36"
["vlatest"]="master"
)

Expand Down
14 changes: 10 additions & 4 deletions tools/pip_package/run_ruff_flake8_pyi.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/bin/bash
set -eEu

declare -A PACKAGE_NAME=(
["blender"]="bpy"
["upbge"]="bge"
)

# Check if a Blender version argument is provided
if [ $# -eq 0 ]; then
echo "No Blender version provided. Usage: $0 <blender_version>"
if [ $# -ne 2 ]; then
echo "No Blender version provided. Usage: $0 <target> <blender_version>"
exit 1
fi

BLENDER_VERSION=$1
ZIP_FILE="fake_bpy_modules_${BLENDER_VERSION}-*.zip"
target=$1
BLENDER_VERSION=$2
ZIP_FILE="fake_${PACKAGE_NAME[$target]}_modules_${BLENDER_VERSION}-*.zip"
EXTRACT_DIR="extracted_modules"

# Find and unzip the correct file
Expand Down
15 changes: 13 additions & 2 deletions tools/utils/download_upbge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,26 @@ set -eEu

SUPPORTED_VERSIONS=(
"0.2.5"
"0.30" "0.36"
"all"
)

declare -A UPBGE_DOWNLOAD_URL_LINUX=(
["v0.2.5"]="https://github.com/UPBGE/upbge/releases/download/v0.2.5/UPBGEv0.2.5b2.79Linux64.tar.xz"
["v0.30"]="https://github.com/UPBGE/upbge/releases/download/v0.30/UPBGE-0.30-linux-x86_64.tar.xz"
["v0.36"]="https://github.com/UPBGE/upbge/releases/download/v0.36.1/upbge-0.36.1-linux-x86_64.tar.xz"
)

declare -A NEED_MOVE_LINUX=(
["v0.2.5"]="UPBGEv0.2.5b2.79Linux64"
["v0.30"]="UPBGE-0.30-linux-x86_64"
["v0.36"]="upbge-0.36.1-linux-x86_64"
)

declare -A UPBGE_CHECKSUM_URL=(
["v0.2.5"]="https://raw.githubusercontent.com/nutti/fake-bge-module/ci_testing/tools/utils/md5sum/0.2.5.md5"
["v0.2.5"]="https://raw.githubusercontent.com/nutti/fake-bge-module/main/tools/utils/md5sum/upbge/0.2.5.md5"
["v0.30"]="https://github.com/UPBGE/upbge/releases/download/v0.30/UPBGE-0.30-Release.md5"
["v0.36"]="https://github.com/UPBGE/upbge/releases/download/v0.36.1/upbge-0.36.1-Release.md5"
)

function get_extractor() {
Expand Down Expand Up @@ -50,14 +57,18 @@ function verify_download_integrity() {

pushd "${download_dir}" 1> /dev/null

curl --fail -s "${checksum_url}" -o "${checksum_filename}"
curl --fail -L -s "${checksum_url}" -o "${checksum_filename}"

if ! grep -q "${target_filename}" "${checksum_filename}"; then
echo "Error: Unable to find \"${target_filename}\" in \"${checksum_filename}\""
cat "${checksum_filename}"
return 1
fi

# Official md5sum files does not follow correct format.
# To suppress an error, modify the checksum file.
sed -i -E 's/\r//g' "${checksum_filename}"

local checksum
checksum="$(grep "${target_filename}" "${checksum_filename}")"

Expand Down
File renamed without changes.

0 comments on commit 3bc5dea

Please sign in to comment.