From 5275444a99f983a71e38f0946a2b0f63dcaec8fc Mon Sep 17 00:00:00 2001 From: annatisch Date: Thu, 12 Oct 2017 09:21:27 -0700 Subject: [PATCH] Prepare version for release --- CHANGES.txt | 9 +++++++-- LICENSE.txt | 2 +- package.py | 18 ++++++++++++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 427a353..181e541 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,13 @@ -(unreleased) v0.15.0 +2017.10.12 v0.15.0 -------------------- -- Updated dependencies azure-batch (4.0.0) and azure-batch-extensions (1.0.0) +- Updated dependencies azure-batch (4.0.0) and azure-batch-extensions (1.0.1) - Better support for unicode +- Some fixes for render-specific asset detection: + - Filter out empty path references + - Correctly detect numbered volume cache data sets + - Removed older Arnold 'dso' volume reference + 2017-09-26 v0.14.0 ------------------ diff --git a/LICENSE.txt b/LICENSE.txt index ca6a07c..d887af7 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ -The Azure Batch Maya Sample ver. 0.15.0 +The Azure Batch Maya Sample Copyright (c) Microsoft Corporation All rights reserved. diff --git a/package.py b/package.py index e7ded46..5c75d5b 100644 --- a/package.py +++ b/package.py @@ -32,7 +32,20 @@ import subprocess import shutil import zipfile -VERSION = "0.15.0" + +def find_version(): + root_dir = os.path.dirname(os.path.realpath(__file__)) + plugin_path = os.path.join(root_dir, 'azure_batch_maya', 'plug-in', 'AzureBatch.py') + plugin_version = "" + with open(plugin_path, 'r') as plugin_file: + for line in plugin_file: + if line.startswith('VERSION ='): + plugin_version = line[9:].strip('\n" \'') + break + if not plugin_version: + raise ValueError("Couldn't detect plugin version from {}".format(plugin_file)) + return plugin_version + def main(): """Build Maya Plug-in package""" @@ -47,7 +60,8 @@ def main(): print("Cannot create build dir at path: {0}".format(package_dir)) return - package = os.path.join(package_dir, "AzureBatch_Maya_Plugin-v{0}.zip".format(VERSION)) + version = find_version() + package = os.path.join(package_dir, "AzureBatch_Maya_Plugin-v{0}.zip".format(version)) source = os.path.abspath("azure_batch_maya") with zipfile.ZipFile(package, mode='w') as maya_zip: