YehonatanShami
06/24/2019, 1:28 PM$version = $(Start-OsqueryProcess $git $gitArgs).stdout
$latest = $version.split('-')[0]
# If split len is greater than 1, this is a pre-release. Chocolatey is
# particular about the format of the version for pre-releases.
if ($version.split('-').length -eq 3) {
$version = $latest + '-' + $version.split('-')[2]
}
# Strip off potential carriage return or newline from version string
$version = $latest.trim()
And here in the function parameters instead of making $version '1.0.0' which I believe (haven't checked) that works it is stated as '0.0.0'
function New-MsiPackage() {
param(
[string] $configPath = '',
[string] $packsPath = $(Join-Path $(Get-Location) 'packs'),
[string] $certsPath = '',
[string] $flagsPath = '',
[string] $shell = 'build\windows10\osquery\Release\osqueryi.exe',
[string] $daemon = 'build\windows10\osquery\Release\osqueryd.exe',
[string] $version = '0.0.0',
[array] $Extras = @()
)