Skip to content

Commit f2ef9b1

Browse files
committed
Set up automatic version bumping from git tags
1 parent b9d2a77 commit f2ef9b1

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
uses: actions/checkout@v4
7272
with:
7373
submodules: true
74+
fetch-depth: 0
7475

7576
- name : Install ninja
7677
uses: seanmiddleditch/gha-setup-ninja@v5
@@ -167,6 +168,8 @@ jobs:
167168
steps:
168169
- name: Checkout code
169170
uses: actions/checkout@v4
171+
with:
172+
fetch-depth: 0
170173

171174
- name: Download artifacts
172175
uses: actions/download-artifact@v4
@@ -187,15 +190,15 @@ jobs:
187190
with:
188191
path: modules/TwistSpline
189192

190-
- name: Set env
193+
- name: Get Latest Tag
191194
run: |
192195
LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG")
193196
echo "LatestTag: ${LATEST_TAG}"
194197
echo "RELEASE_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
195198
196199
- name: Create distribution
197200
run: |
198-
cp ./TwistSpline.mod modules/
201+
sed "s/DEVELOP/${{env.RELEASE_VERSION}}/" TwistSpline.mod > modules/TwistSpline.mod
199202
mkdir -p modules/TwistSpline/scripts
200203
cp -r ./scripts modules/TwistSpline
201204
mkdir -p modules/TwistSpline/icons

TwistSpline.mod

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
+ PLATFORM:win64 MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline
1+
+ PLATFORM:win64 MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline
22
[r] icons: icons
33
plug-ins: windows-2022
44
[r] scripts: scripts
55

6-
+ PLATFORM:linux MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline
6+
+ PLATFORM:linux MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline
77
[r] icons: icons
88
plug-ins: linux-2022
99
[r] scripts: scripts
1010

11-
+ PLATFORM:mac MAYAVERSION:2022 TwistSpline 1.2.1 TwistSpline
11+
+ PLATFORM:mac MAYAVERSION:2022 TwistSpline DEVELOP TwistSpline
1212
[r] icons: icons
1313
plug-ins: mac-2022
1414
[r] scripts: scripts
1515

16-
+ PLATFORM:win64 MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline
16+
+ PLATFORM:win64 MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline
1717
[r] icons: icons
1818
plug-ins: windows-2023
1919
[r] scripts: scripts
2020

21-
+ PLATFORM:linux MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline
21+
+ PLATFORM:linux MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline
2222
[r] icons: icons
2323
plug-ins: linux-2023
2424
[r] scripts: scripts
2525

26-
+ PLATFORM:mac MAYAVERSION:2023 TwistSpline 1.2.1 TwistSpline
26+
+ PLATFORM:mac MAYAVERSION:2023 TwistSpline DEVELOP TwistSpline
2727
[r] icons: icons
2828
plug-ins: mac-2023
2929
[r] scripts: scripts
3030

31-
+ PLATFORM:win64 MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline
31+
+ PLATFORM:win64 MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline
3232
[r] icons: icons
3333
plug-ins: windows-2024
3434
[r] scripts: scripts
3535

36-
+ PLATFORM:linux MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline
36+
+ PLATFORM:linux MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline
3737
[r] icons: icons
3838
plug-ins: linux-2024
3939
[r] scripts: scripts
4040

41-
+ PLATFORM:mac MAYAVERSION:2024 TwistSpline 1.2.1 TwistSpline
41+
+ PLATFORM:mac MAYAVERSION:2024 TwistSpline DEVELOP TwistSpline
4242
[r] icons: icons
4343
plug-ins: mac-2024
4444
[r] scripts: scripts
4545

46-
+ PLATFORM:win64 MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline
46+
+ PLATFORM:win64 MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline
4747
[r] icons: icons
4848
plug-ins: windows-2025
4949
[r] scripts: scripts
5050

51-
+ PLATFORM:linux MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline
51+
+ PLATFORM:linux MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline
5252
[r] icons: icons
5353
plug-ins: linux-2025
5454
[r] scripts: scripts
5555

56-
+ PLATFORM:mac MAYAVERSION:2025 TwistSpline 1.2.1 TwistSpline
56+
+ PLATFORM:mac MAYAVERSION:2025 TwistSpline DEVELOP TwistSpline
5757
[r] icons: icons
5858
plug-ins: mac-2025
5959
[r] scripts: scripts

meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ source_files = [
1414
'src/twistMultiTangentNode.cpp',
1515
]
1616

17-
harm_inc = include_directories(['src'])
17+
latest_tag = run_command('git', 'describe', '--tags', '--abbrev=0').stdout().strip()
18+
if latest_tag == ''
19+
latest_tag = 'NOTAG'
20+
endif
21+
add_project_arguments('-DVERSION_STRING="' + latest_tag + '"', language: 'cpp')
1822

1923
outlib = shared_library(
2024
meson.project_name(),
2125
source_files,
2226
install: true,
2327
install_dir : meson.global_source_root() / 'output_Maya' + maya_version,
24-
include_directories : harm_inc,
28+
include_directories : include_directories(['src']),
2529
dependencies : maya_dep,
2630
name_prefix : '',
2731
name_suffix : maya_name_suffix,

src/pluginMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SOFTWARE.
3232

3333
MStatus initializePlugin( MObject obj ) {
3434
MStatus status;
35-
MFnPlugin plugin( obj, "BlurStudio", "1.2.1", "Any");
35+
MFnPlugin plugin( obj, "BlurStudio", VERSION_STRING, "Any");
3636

3737
status = plugin.registerData("twistSplineData", TwistSplineData::id, TwistSplineData::creator);
3838
if (!status) {

0 commit comments

Comments
 (0)