-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove obsolete script placeholder (scripts/download_gdtf_generic.py) this is implemented in Development branch already - Update release script (add ignore patterns, reformat with black) - Update version, some metadata, changelog, dependencies
- Loading branch information
Showing
5 changed files
with
67 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
### Dependencies | ||
|
||
As we must vendor some libraries in, due to how Blender dependencies work, here | ||
As we must vendor some libraries in due to how Blender dependencies work, here | ||
is a list of included libraries. | ||
|
||
* python-gdtf: https://github.com/jackdpage/python-gdtf/ | ||
* python-gdtf: https://github.com/open-stage/python-gdtf | ||
* python-mvr: https://github.com/open-stage/python-mvr | ||
* sACN / E1.31 module: https://github.com/Hundemeier/sacn | ||
* python-mvr: https://github.com/vanous/python-mvr | ||
* 3DS Importer: https://projects.blender.org/blender/blender-addons-contrib.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,62 @@ | ||
import re | ||
import os | ||
import shutil | ||
from distutils.dir_util import copy_tree | ||
from shutil import copytree, ignore_patterns | ||
from pygit2 import Repository | ||
|
||
BUILD_DIR = 'build' | ||
BUILD_DIR = "build" | ||
|
||
branch_name = Repository('.').head.shorthand | ||
if (branch_name == None): | ||
raise Exception('Run the script from the project root.') | ||
branch_name = Repository(".").head.shorthand | ||
if branch_name == None: | ||
raise Exception("Run the script from the project root.") | ||
|
||
branch_name = 'master' | ||
branch_name = "release_v1.0.1" | ||
|
||
release_name = branch_name | ||
if (re.match(r'^release_v\d+\.\d+\.\d+$', branch_name)): | ||
print('Warning: This is not a release branch. The branch should be named "release_vX.Y.Z".') | ||
if re.match(r"^release_v\d+\.\d+\.\d+$", branch_name): | ||
print( | ||
'Warning: This is not a release branch. The branch should be named "release_vX.Y.Z".' | ||
) | ||
release_name = branch_name[8:] | ||
|
||
zip_name = 'blenderDMX_' + release_name | ||
zip_name = "blenderDMX_" + release_name | ||
|
||
print('---------') | ||
print('branch name: ' + branch_name) | ||
print('release name: ' + release_name) | ||
print('zip name: ' + zip_name + '.zip') | ||
print('---------') | ||
print("---------") | ||
print("branch name: " + branch_name) | ||
print("release name: " + release_name) | ||
print("zip name: " + zip_name + ".zip") | ||
print("---------") | ||
|
||
print('Resetting build directory...') | ||
if (os.path.exists(BUILD_DIR)): | ||
print("Resetting build directory...") | ||
if os.path.exists(BUILD_DIR): | ||
shutil.rmtree(BUILD_DIR) | ||
os.mkdir(BUILD_DIR) | ||
os.mkdir(BUILD_DIR+'/dmx') | ||
os.mkdir(BUILD_DIR + "/dmx") | ||
|
||
print('Copying dependencies to build directory...') | ||
copy_tree('assets', BUILD_DIR+'/dmx/assets') | ||
copy_tree('io_scene_3ds', BUILD_DIR+'/dmx/io_scene_3ds') | ||
copy_tree('panels', BUILD_DIR+'/dmx/panels') | ||
copy_tree('pygdtf', BUILD_DIR+'/dmx/pygdtf') | ||
copy_tree('pymvr', BUILD_DIR+'/dmx/pymvr') | ||
copy_tree('sacn', BUILD_DIR+'/dmx/sacn') | ||
# List of files/directories to skip during copy | ||
ignore = ignore_patterns("*.pyc", "__pycache__", ".mypy_cache", ".pytest_cache") | ||
|
||
print('Copying source to build directory...') | ||
for filename in os.listdir('.'): | ||
if filename.endswith('.py'): | ||
shutil.copy2(filename, BUILD_DIR+'/dmx') | ||
print("Copying dependencies to build directory...") | ||
copytree("assets", BUILD_DIR + "/dmx/assets", ignore=ignore) | ||
copytree("io_scene_3ds", BUILD_DIR + "/dmx/io_scene_3ds", ignore=ignore) | ||
copytree("panels", BUILD_DIR + "/dmx/panels", ignore=ignore) | ||
copytree("pygdtf", BUILD_DIR + "/dmx/pygdtf", ignore=ignore) | ||
copytree("pymvr", BUILD_DIR + "/dmx/pymvr", ignore=ignore) | ||
copytree("sacn", BUILD_DIR + "/dmx/sacn", ignore=ignore) | ||
|
||
print('Copying metadata to build directory...') | ||
shutil.copy2('CHANGELOG.md', BUILD_DIR+'/dmx') | ||
shutil.copy2('LICENSE', BUILD_DIR+'/dmx') | ||
print("Copying source to build directory...") | ||
for filename in os.listdir("."): | ||
if filename.endswith(".py"): | ||
shutil.copy2(filename, BUILD_DIR + "/dmx") | ||
|
||
print('Zipping release...') | ||
shutil.make_archive(zip_name, 'zip', BUILD_DIR) | ||
print("Copying metadata to build directory...") | ||
shutil.copy2("CHANGELOG.md", BUILD_DIR + "/dmx") | ||
shutil.copy2("LICENSE", BUILD_DIR + "/dmx") | ||
|
||
print('Clearing build directory...') | ||
print("Zipping release...") | ||
shutil.make_archive(zip_name, "zip", BUILD_DIR) | ||
|
||
print("Clearing build directory...") | ||
shutil.rmtree(BUILD_DIR) | ||
|
||
print('Build successfull! Have a great release!') | ||
print("Build successfull! Have a great release!") |
This file was deleted.
Oops, something went wrong.