-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added general idea of returning version string for Add get-fogversion #…
…10 will need to make a branch for using it to adjust the core objects dynamically
- Loading branch information
1 parent
7b1344e
commit ec8c95f
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
.github/workflows/build-test.yml → .github/workflows/build-test.yml.notready
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
function Get-FogVersion { | ||
<# | ||
.SYNOPSIS | ||
Gets the version of FOG | ||
.DESCRIPTION | ||
Only works for 1.6 beta and above, 1.5.x is identified as 1.5.10 if null is returned | ||
.EXAMPLE | ||
Get-FogVersion; | ||
Will return the full version string | ||
.NOTES | ||
General notes | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
|
||
) | ||
|
||
|
||
process { | ||
return Invoke-FogApi -uriPath "system/info" -Method Get; | ||
$versionStr = (Invoke-FogApi -uriPath "system/info" -Method Get).version; | ||
if ([string]::IsNullOrEmpty($versionStr)) { | ||
return "1.5.10"; | ||
} | ||
} | ||
|
||
} |