-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
24 lines (18 loc) · 904 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
VERSION="1.0.4"
BUILDS_FOLDER="builds"
if [ -d "${BUILDS_FOLDER}/node_search" ]; then
rm -rf "${BUILDS_FOLDER}/node_search"
fi
mkdir -p "${BUILDS_FOLDER}/node_search"
# copy addon source files, remove pycache
cp -r *.py ${BUILDS_FOLDER}/node_search
cp -r blender_manifest.toml ${BUILDS_FOLDER}/node_search
# change version in bl_info to match one in this file
sed -i "s/\"version\": ([0-9], [0-9], [0-9])/\"version\": (`echo ${VERSION} | sed -e 's/\./, /g'`)/" ${BUILDS_FOLDER}/node_search/__init__.py
# change version in blender_manifest to match one in this file
sed -i "s/\bversion\b = \"[0-9]\.[0-9]\.[0-9]\"/version = \"`echo ${VERSION}`\"/" ${BUILDS_FOLDER}/node_search/blender_manifest.toml
# remove old zip, zip everything
rm -f node_search*.zip
cd ${BUILDS_FOLDER}; zip -r ../node_search_${VERSION}.zip node_search/*
echo "Release zip saved at 'node_search_${VERSION}.zip'"