-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate.ps1
More file actions
21 lines (17 loc) · 1.29 KB
/
update.ps1
File metadata and controls
21 lines (17 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[CmdletBinding()] # Enables -Debug parameter for troubleshooting
param ()
# Set vars to the script and the parent path
$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$ParentPath = Split-Path -Parent $ScriptPath
# Import the UpdateChocolateyPackage function
. (Join-Path $ParentPath 'Chocolatey-Package-Updater.ps1')
# Create a hash table to store package information
$packageInfo = @{
PackageName = "ventoy" # Package name
FileUrl = "https://github.com/ventoy/Ventoy/releases/download/v{VERSION}/ventoy-{VERSION}-windows.zip" # URL to download the file from, using {VERSION} where the version number goes
GitHubRepoUrl = "https://github.com/ventoy/Ventoy" # GitHub repository URL
AutoPush = $true # Automatically push the package to the Chocolatey community repository
EnvFilePath = "..\.env" # Path to the .env file for alerting
}
# Call the UpdateChocolateyPackage function and pass the hash table
UpdateChocolateyPackage @packageInfo