mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Merge pull request #1 from twangboy/fix_bootstrap
Fix version detection, versionSection creation
This commit is contained in:
commit
aa887bfa97
1 changed files with 6 additions and 5 deletions
|
@ -228,19 +228,20 @@ If (!$version) {
|
|||
$returnMatches = $returnMatches | Where {$_ -like "Salt-Minion*AMD64-Setup.exe"}
|
||||
}
|
||||
|
||||
$version = $($returnMatches[$returnMatches.Count -1]).Split(("n-","-A","-x"),([System.StringSplitOptions]::RemoveEmptyEntries))[1]
|
||||
$version = $($returnMatches[$returnMatches.Count -1]).Split(("n-","-A","-x","-P"),([System.StringSplitOptions]::RemoveEmptyEntries))[1]
|
||||
}
|
||||
|
||||
$year = $version.Substring(0, 3)
|
||||
$versionSection = $version
|
||||
|
||||
$year = $version.Substring(0, 4)
|
||||
If ([int]$year -ge 2017) {
|
||||
If ($pythonVersion -eq "3") {
|
||||
$pythonVersion = "-Py3"
|
||||
$versionSection = "$version-Py3"
|
||||
}
|
||||
Else {
|
||||
$pythonVersion = "-Py2"
|
||||
$versionSection = "$version-Py2"
|
||||
}
|
||||
}
|
||||
$versionSection = $version + $pythonVersion
|
||||
|
||||
#===============================================================================
|
||||
# Download minion setup file
|
||||
|
|
Loading…
Add table
Reference in a new issue