Skip to content

Commit

Permalink
Add ManicTimeClient #572
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Jul 7, 2024
1 parent eba0564 commit 66dfa98
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Evergreen/Apps/Get-ManicTimeClient.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function Get-ManicTimeClient {
<#
.NOTES
Site: https://stealthpuppy.com
Author: Aaron Parker
Twitter: @stealthpuppy
#>
[OutputType([System.Management.Automation.PSObject])]
[CmdletBinding(SupportsShouldProcess = $False)]
param (
[Parameter(Mandatory = $False, Position = 0)]
[ValidateNotNull()]
[System.Management.Automation.PSObject]
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

$UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri
if ($null -ne $UpdateFeed) {
# Build the output object; Output object to the pipeline
$PSObject = [PSCustomObject] @{
Version = $UpdateFeed.version
Date = $UpdateFeed.releaseDate
Type = Get-FileType -File $UpdateFeed.downloadUrl
URI = $UpdateFeed.downloadUrl
}
Write-Output -InputObject $PSObject
}
}
24 changes: 24 additions & 0 deletions Evergreen/Manifests/ManicTimeClient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"Name": "ManicTime",
"Source": "https://www.manictime.com/download/windows",
"Get": {
"Update": {
"Uri": "https://services.manictime.com/Versions/GetLatestVersionNumber?currentVersion=2024.1.1.0&runtime=win-x64&targetRuntime=win-x64&operatingSystemVersion=10.0.22621.0&platform=X64&systemCulture=en-US&includeMessage=False"
}
},
"Install": {
"Setup": "AppName.*.exe",
"Physical": {
"Arguments": "",
"PostInstall": [

]
},
"Virtual": {
"Arguments": "",
"PostInstall": [

]
}
}
}

0 comments on commit 66dfa98

Please sign in to comment.