diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 300f00f..4ecf915 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,6 +71,7 @@ jobs: uses: actions/checkout@v4 with: submodules: true + fetch-depth: 0 - name : Install ninja uses: seanmiddleditch/gha-setup-ninja@v5 @@ -167,6 +168,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Download artifacts uses: actions/download-artifact@v4 @@ -187,7 +190,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 +198,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..379f6d2 100644 --- a/meson.build +++ b/meson.build @@ -14,14 +14,18 @@ source_files = [ 'src/twistMultiTangentNode.cpp', ] -harm_inc = include_directories(['src']) +latest_tag = run_command('git', 'describe', '--tags', '--abbrev=0').stdout().strip() +if latest_tag == '' + latest_tag = 'NOTAG' +endif +add_project_arguments('-DVERSION_STRING="' + latest_tag + '"', language: 'cpp') 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..8476ef8 100644 --- a/src/pluginMain.cpp +++ b/src/pluginMain.cpp @@ -32,7 +32,7 @@ SOFTWARE. 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) {