Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Determine the installer version based on Git revision and tags #224

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

evanspearman-a
Copy link
Contributor

What was the problem/requirement? (What/Why)

DCC Submitter installers get their version from an environment variable, or use "00000000" for dev builds, then add the current date on the end. Instead, installers should have versions based on repository tags. If the latest tag matches the current commit hash, the version should just be the latest tag. Otherwise, the version should be the latest tag plus the short commit hash of the current commit.

What was the solution? (How)

Change the way the installer building script determines the version to match what was described above. Additionally I added a flag for overriding the version.

What is the impact of this change?

Versions will be related to the tags.

How was this change tested?

I build the installer, ran it, and verified that installer_version.txt contained the correct version.

Please run the integration tests and paste the results below

N/A

If installer/ was modified or a file was added/removed from src/, then update the installer tests and post the test results below

================================== test session starts ==================================
platform win32 -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- C:\Users\evans\AppData\Local\hatch\env\virtual\deadline-cloud-for-blender\xII6PE8V\deadline-cloud-for-blender\Scripts\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\evans\Development\installers-project\deadline-cloud-for-blender
configfile: pyproject.toml
plugins: cov-6.1.1, xdist-3.6.1
8 workers [13 items]    
scheduling tests via LoadScheduling

test/installer/test_installer.py::test_default_location
test/installer/test_installer.py::TestLinuxAndMacOS::test_system_permissions
test/installer/test_installer.py::TestLinuxAndMacOS::test_user_permissions
test/installer/test_installer.py::TestWindows::test_user_permissions
test/installer/test_installer.py::TestUserInstall::test_install
test/installer/test_installer.py::TestWindows::test_system_permissions
[gw2] [  7%] SKIPPED test/installer/test_installer.py::TestLinuxAndMacOS::test_user_permissions
[gw3] [ 15%] SKIPPED test/installer/test_installer.py::TestLinuxAndMacOS::test_system_permissions
[gw5] [ 23%] SKIPPED test/installer/test_installer.py::TestWindows::test_system_permissions
test/installer/test_installer.py::test_did_not_build_with_evaluation_mode
test/installer/test_installer.py::TestVerifySigning::test_windows_signing 
[gw2] [ 30%] SKIPPED test/installer/test_installer.py::TestVerifySigning::test_windows_signing
test/installer/test_installer.py::TestVerifySigning::test_linux_signing
[gw3] [ 38%] SKIPPED test/installer/test_installer.py::TestVerifySigning::test_linux_signing
[gw1] [ 46%] SKIPPED test/installer/test_installer.py::test_did_not_build_with_evaluation_mode
test/installer/test_installer.py::TestUserInstall::test_uninstall
test/installer/test_installer.py::TestSystemInstall::test_uninstall
[gw1] [ 53%] SKIPPED test/installer/test_installer.py::TestSystemInstall::test_uninstall  
[gw0] [ 61%] PASSED test/installer/test_installer.py::test_default_location
test/installer/test_installer.py::TestSystemInstall::test_install
[gw0] [ 69%] SKIPPED test/installer/test_installer.py::TestSystemInstall::test_install    
[gw6] [ 76%] PASSED test/installer/test_installer.py::TestUserInstall::test_install       
[gw4] [ 84%] PASSED test/installer/test_installer.py::TestWindows::test_user_permissions  
test/installer/test_installer.py::TestVerifySigning::test_macos_signing
[gw4] [ 92%] SKIPPED test/installer/test_installer.py::TestVerifySigning::test_macos_signing
[gw7] [100%] PASSED test/installer/test_installer.py::TestUserInstall::test_uninstall     

================================== slowest 5 durations ================================== 
89.35s setup    test/installer/test_installer.py::TestUserInstall::test_uninstall
88.39s setup    test/installer/test_installer.py::TestUserInstall::test_install
88.30s setup    test/installer/test_installer.py::TestWindows::test_user_permissions      
19.04s call     test/installer/test_installer.py::TestUserInstall::test_uninstall
5.05s call     test/installer/test_installer.py::test_default_location
======================= 4 passed, 9 skipped in 111.84s (0:01:51) ========================

Was this change documented?

No

Is this a breaking change?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@evanspearman-a evanspearman-a requested a review from a team as a code owner April 7, 2025 19:44
Copy link

sonarqubecloud bot commented Apr 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant