Skip to content

Commit f3d6d7a

Browse files
committed
CR replace version in files
1 parent 101f784 commit f3d6d7a

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static string GetVersionFromReadme()
124124
}
125125

126126
try{
127-
var versionHeader = "**Version**:";
127+
var versionHeader = "VERSION:";
128128
var lines = File.ReadAllLines (absPath);
129129
foreach (var line in lines) {
130130
if (line.StartsWith(versionHeader)) {

Assets/FbxExporters/README.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
# FbxExporters
1+
FbxExporters Package
2+
====================
23

34
Copyright (c) 2017 Unity Technologies. All rights reserved.
45

56
See LICENSE.txt file for full license information.
67

7-
**Version**: 0.0.14a
8+
VERSION: build20170921001
89

910
Requirements
1011
------------
1112

12-
* [FBX SDK C# Bindings](https://github.com/Unity-Technologies/FbxSharp)
13+
The Unity Integration for Maya is designed to work with Maya 2017 or later.
1314

14-
Installing Maya Integration
15-
--------------------------------------------
15+
Please note that MayaLT is not supported at this time.
1616

17-
The easiest way to install the Maya integration is from the menu option in Unity.
17+
Installing Unity Integration for Maya
18+
-------------------------------------
1819

19-
FbxExporters -> Install Maya Integration
20+
The easiest way to install the Unity integration For Maya is from the FbxExports Settings panel in Unity.
21+
22+
MenuBar -> Edit -> Project Settings -> Fbx Export -> Install Unity Integration
2023

2124
This menu item locates and uses the most recent version of Maya installed. If you want
22-
to specify a custom version or location then set your MAYA_LOCATION environment
23-
before running Unity.
25+
to specify a custom version or location you can browse and locate your version.
2426

2527
Alternately, you can install the package and integrations from the command-line
2628
using a script, an example of which can be found in the scripts folder of the

Assets/Integrations/Autodesk/maya/scripts/unityOneClick/version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@defgroup UnityOneClickPluginVersion Plugin Version
2020
@ingroup UnityOneClickPlugin
2121
"""
22+
VERSION = build20170921001
2223

2324
def pluginPrefix():
2425
"""
@@ -32,14 +33,14 @@ def versionName():
3233
Return version string for the unityOneClick plugin
3334
@ingroup UnityOneClickPluginVersion
3435
"""
35-
return '0.0.14a'
36+
return VERSION
3637

3738
def pluginName():
3839
"""
3940
Return name of unityOneClick plugin
4041
@ingroup UnityOneClickPluginVersion
4142
"""
42-
return '{}.unityOneClick'.format(pluginPrefix())
43+
return 'UnityOneClick'
4344

4445
def vendorName():
4546
"""

CMakeLists.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,23 @@ add_custom_target(
8585
)
8686

8787
###########################################################################
88-
# TODO: Add target to replace the version number in README.txt
88+
# Add target to replace the unity package version number in files
89+
set(README_TARGET readme_replace)
90+
add_custom_target(
91+
${README_TARGET}
92+
COMMAND ${PYTHON_EXECUTABLE}
93+
"${CMAKE_SOURCE_DIR}/scripts/file-search-replace.py"
94+
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/README.txt"
95+
"^\\s*VERSION.*:.*"
96+
"VERSION: ${PACKAGE_VERSION}"
97+
COMMAND ${PYTHON_EXECUTABLE}
98+
"${CMAKE_SOURCE_DIR}/scripts/file-search-replace.py"
99+
"${CMAKE_SOURCE_DIR}/Assets/Integrations/Autodesk/maya/scripts/unityOneClick/version.py"
100+
"^\\s*VERSION.*=.*"
101+
"VERSION = ${PACKAGE_VERSION}"
102+
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/file-search-replace.py"
103+
COMMENT "Replacing version number in files"
104+
)
89105

90106
###########################################################################
91107
# Zip integrations folder
@@ -116,7 +132,7 @@ add_custom_command(
116132
COMMENT "Creating Unity Package ${PACKAGE_PATH}"
117133
DEPENDS ${MAYA_INTEGRATION_TARGET}
118134
)
119-
add_custom_target(unitypackage ALL DEPENDS ${PACKAGE_PATH} ${FBXSDK_PACKAGE_TARGET} ${MAYA_INTEGRATION_TARGET})
135+
add_custom_target(unitypackage ALL DEPENDS ${PACKAGE_PATH} ${FBXSDK_PACKAGE_TARGET} ${MAYA_INTEGRATION_TARGET} ${README_TARGET})
120136

121137
enable_testing()
122138
add_test(NAME run-all COMMAND "${UNITY_EDITOR_PATH}" -batchmode -projectPath ${CMAKE_SOURCE_DIR} runEditorTests -quit)

0 commit comments

Comments
 (0)