Skip to content

Commit

Permalink
Set up automatic version bumping from git tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tbttfox committed Aug 23, 2024
1 parent b9d2a77 commit f2ef9b1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name : Install ninja
uses: seanmiddleditch/gha-setup-ninja@v5
Expand Down Expand Up @@ -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
Expand All @@ -187,15 +190,15 @@ 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}"
echo "RELEASE_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
- 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
Expand Down
24 changes: 12 additions & 12 deletions TwistSpline.mod
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/pluginMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f2ef9b1

Please sign in to comment.