diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 300f00f..1f52942 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,6 +72,11 @@ jobs: with: submodules: true + - name: Update version + run: | + LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG") + sed 's/DEVELOP/${LATEST_TAG}/' src/version.h > src/version.h + - name : Install ninja uses: seanmiddleditch/gha-setup-ninja@v5 @@ -187,7 +192,7 @@ jobs: with: path: modules/TwistSpline - - name: Set env + - name: Get Latest Tag run: | LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG") echo "LatestTag: ${LATEST_TAG}" @@ -195,7 +200,7 @@ jobs: - name: Create distribution run: | - cp ./TwistSpline.mod modules/ + sed 's/DEVELOP/${{env.RELEASE_VERSION}}/' TwistSpline.mod > modules/TwistSpline.mod mkdir -p modules/TwistSpline/scripts cp -r ./scripts modules/TwistSpline mkdir -p modules/TwistSpline/icons diff --git a/TwistSpline.mod b/TwistSpline.mod index 25864f1..87025d4 100644 --- a/TwistSpline.mod +++ b/TwistSpline.mod @@ -1,59 +1,59 @@ -+ PLATFORM:win64 MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:win64 MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: windows-2022 [r] scripts: scripts -+ PLATFORM:linux MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:linux MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: linux-2022 [r] scripts: scripts -+ PLATFORM:mac MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:mac MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: mac-2022 [r] scripts: scripts -+ PLATFORM:win64 MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:win64 MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: windows-2023 [r] scripts: scripts -+ PLATFORM:linux MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:linux MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: linux-2023 [r] scripts: scripts -+ PLATFORM:mac MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:mac MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: mac-2023 [r] scripts: scripts -+ PLATFORM:win64 MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:win64 MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: windows-2024 [r] scripts: scripts -+ PLATFORM:linux MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:linux MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: linux-2024 [r] scripts: scripts -+ PLATFORM:mac MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:mac MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: mac-2024 [r] scripts: scripts -+ PLATFORM:win64 MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:win64 MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: windows-2025 [r] scripts: scripts -+ PLATFORM:linux MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:linux MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: linux-2025 [r] scripts: scripts -+ PLATFORM:mac MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline ++ PLATFORM:mac MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline [r] icons: icons plug-ins: mac-2025 [r] scripts: scripts diff --git a/meson.build b/meson.build index 852de80..ce67ce2 100644 --- a/meson.build +++ b/meson.build @@ -14,14 +14,12 @@ source_files = [ 'src/twistMultiTangentNode.cpp', ] -harm_inc = include_directories(['src']) - outlib = shared_library( meson.project_name(), source_files, install: true, install_dir : meson.global_source_root() / 'output_Maya' + maya_version, - include_directories : harm_inc, + include_directories : include_directories(['src']), dependencies : maya_dep, name_prefix : '', name_suffix : maya_name_suffix, diff --git a/src/pluginMain.cpp b/src/pluginMain.cpp index 06f0d6c..5424d6b 100644 --- a/src/pluginMain.cpp +++ b/src/pluginMain.cpp @@ -28,11 +28,12 @@ SOFTWARE. #include "twistTangentNode.h" #include "twistMultiTangentNode.h" #include "drawOverride.h" +#include "version.h" #include MStatus initializePlugin( MObject obj ) { MStatus status; - MFnPlugin plugin( obj, "BlurStudio", "1.2.1", "Any"); + MFnPlugin plugin( obj, "BlurStudio", VERSION_STRING, "Any"); status = plugin.registerData("twistSplineData", TwistSplineData::id, TwistSplineData::creator); if (!status) { diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..52b3a6c --- /dev/null +++ b/src/version.h @@ -0,0 +1,3 @@ +#pragma once + +#define VERSION_STRING "DEVELOP"