Skip to content

Commit

Permalink
Added general idea of returning version string for Add get-fogversion #…
Browse files Browse the repository at this point in the history
…10 will need to make a branch for using it to adjust the core objects dynamically
  • Loading branch information
darksidemilk committed Aug 18, 2024
1 parent 7b1344e commit ec8c95f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Need to modularize the build steps so that documentation related steps can be run separately from the build steps as well as the incremeneting of the version number.
name: Test Build

on:
Expand Down
20 changes: 19 additions & 1 deletion FogApi/Public/Get-FogVersion.ps1
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";
}
}

}

0 comments on commit ec8c95f

Please sign in to comment.