Skip to content

Commit

Permalink
Release v1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
vanous committed Dec 22, 2023
1 parent 913d648 commit fd5f365
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Changelog

### 1.0.6

* Initial support for MVR-xchange protocol added
* Added ArtPoll reply

### 1.0.5

* Set beam type based on Spot/Wash/None beam types as defined in GDTF
Expand Down
1 change: 1 addition & 0 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ is a list of included libraries.
* ifaddr: https://github.com/pydron/ifaddr
* oscpy: https://github.com/kivy/oscpy
* zeroconf: https://github.com/python-zeroconf/python-zeroconf
* async_timeout: https://github.com/aio-libs/async-timeout/
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Formatting

Use `ruff` to format the code.
Use `ruff` to format the code. Formatting code with Blender can be problematic as short lines are typically better.

### Logging

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ A DMX visualization tool inside <a href="https://blender.org">Blender</a>, desig

First of all, make sure you have installed [Blender 3.0](https://www.blender.org/download/) or higher (Blender 4.x is supported). Then, download the `zip` file:

### LATEST RELEASE (STABLE): v1.0.5
### LATEST RELEASE (STABLE): v1.0.6

1. From the [latest release](https://github.com/open-stage/blender-dmx/releases/latest) download the [blenderDMX_v1.0.5.zip](https://github.com/open-stage/blender-dmx/releases/download/v1.0.5/blenderDMX_v1.0.5.zip) file
1. From the [latest release](https://github.com/open-stage/blender-dmx/releases/latest) download the [blenderDMX_v1.0.6.zip](https://github.com/open-stage/blender-dmx/releases/download/v1.0.6/blenderDMX_v1.0.6.zip) file

### ROLLING RELEASE (UNSTABLE)

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "DMX",
"description": "DMX visualization and programming, with GDTF/MVR and Network support",
"author": "open-stage",
"version": (1, 0, 5),
"version": (1, 0, 6),
"blender": (3, 0, 0),
"location": "3D View > DMX",
"doc_url": "https://github.com/open-stage/blender-dmx/wiki",
Expand Down
5 changes: 3 additions & 2 deletions mdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def __init__(self):
self._dmx = bpy.context.scene.dmx

def callback(zeroconf: Zeroconf, service_type: str, name: str, state_change: ServiceStateChange) -> None:
#print(f"Service {name} of type {service_type} state changed: {state_change}")
# print(f"Service {name} of type {service_type} state changed: {state_change}")

info = zeroconf.get_service_info(service_type, name)
service_name = name.replace(f".{service_type}", "")
station_name = ""
station_uuid = ""
ip_address = ""
Expand All @@ -43,7 +44,7 @@ def callback(zeroconf: Zeroconf, service_type: str, name: str, state_change: Ser
station_name = info.properties[b"StationName"].decode("utf-8")
if b"StationUUID" in info.properties:
station_uuid = info.properties[b"StationUUID"].decode("utf-")

station_name = f"{station_name} ({service_name})"
if state_change is ServiceStateChange.Added:
DMX_Zeroconf._instance._dmx.createMVR_Client(station_name, station_uuid, ip_address, int(port))
elif state_change is ServiceStateChange.Updated:
Expand Down
31 changes: 16 additions & 15 deletions scripts/build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
from shutil import copytree, ignore_patterns
from pygit2 import Repository
import sys
import os

BUILD_DIR = "build"


def read_version():
line = ""
with open("__init__.py", "r") as f:
while True:
line += f.readline().rstrip()
if "}" in line:
break
version_string = line.replace("bl_info = ","")
bl_info=eval(version_string)
x,y,z = bl_info["version"]
line += f.readline().rstrip()
if "}" in line:
break
version_string = line.replace("bl_info = ", "")
bl_info = eval(version_string)
x, y, z = bl_info["version"]
return f"{x}.{y}.{z}"


Expand All @@ -25,20 +27,18 @@ def read_version():
raise Exception("Run the script from the project root.")

set_version = read_version()
#branch_name = "release_v1.0.3"
# branch_name = "release_v1.0.3"
branch_version = branch_name[9:]
print(branch_name)

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".'
)
print('Warning: This is not a release branch. The branch should be named "release_vX.Y.Z".')
release_name = branch_name[8:]


if set_version != branch_version:
if len(sys.argv)>1: # any command line argument will do to skip version check
if len(sys.argv) > 1: # any command line argument will do to skip version check
print("Continue for local testing")
else:
print(f"Branch version {branch_version} and add-on version {set_version} do not match. Exit!")
Expand Down Expand Up @@ -89,11 +89,12 @@ def read_version():
print("Zipping release...")
shutil.make_archive(zip_name, "zip", BUILD_DIR)

if len(sys.argv)>1: # any command line argument will do to skip version check
if len(sys.argv) > 1: # any command line argument will do to skip version check
if sys.argv[1] == "github":
print("Keeping the build directory")
else:
print("Clearing build directory...")
shutil.rmtree(BUILD_DIR)
sys.exit()

print("Clearing build directory...")
shutil.rmtree(BUILD_DIR)

print("Build successfull! Have a great release!")

0 comments on commit fd5f365

Please sign in to comment.