Skip to content

Instantly share code, notes, and snippets.

Created Oct 11, 2021
What would you like to do?
Build Blender addon zip file with versioning
$versionList = Select-String -Path ".\path-to-addon\" -Pattern '"version":\s*\((\d+)\D*(\d+)\D*(\d+)\)'
$majorVersion = $versionList.Matches.Groups[1].Value
$minorVersion = $versionList.Matches.Groups[2].Value
$patchVersion = $versionList.Matches.Groups[3].Value
Get-ChildItem -Path "." -Directory | Where-Object BaseName -eq "addon-name" | Compress-Archive -DestinationPath ".\addon-name-$majorVersion-$minorVersion-$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment