Skip to content

Commit

Permalink
Add CI environment check
Browse files Browse the repository at this point in the history
For Blender addon build script
  • Loading branch information
n-jay committed Jul 4, 2024
1 parent 7fa8a25 commit f809128
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ci/build_blender_addon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ OPENCUE_PATH="pycue/opencue"

ADDON_PATH="cuesubmit/plugins/blender/OpenCue-Blender"

log() {
echo "$(date "+%Y-%m-%d %H:%M:%S") $1 $2"
}

copy_dependencies() {
DEPENDENCIES_PATH="${ADDON_PATH}/dependencies"
mkdir -p "${DEPENDENCIES_PATH}"
Expand All @@ -40,6 +44,12 @@ copy_dependencies() {
main() {
log INFO "Copying dependencies into ${ADDON_PATH}"
copy_dependencies
mkdir -p "${GITHUB_WORKSPACE}/artifacts/"
zip -r "${GITHUB_WORKSPACE}/artifacts/OpenCue-Blender.zip" "${ADDON_PATH}"
# Check if script is running within GitHub Actions pipeline
if ["$GITHUB_ACTIONS" == "true"]
then
mkdir -p "${GITHUB_WORKSPACE}/artifacts/"
zip -r "${GITHUB_WORKSPACE}/artifacts/OpenCue-Blender.zip" "${ADDON_PATH}"
else
zip -r "cuesubmit/plugins/blender/OpenCue-Blender.zip" "${ADDON_PATH}"
fi
}

0 comments on commit f809128

Please sign in to comment.