Skip to content

Commit

Permalink
Implement support for forced package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brogers5 committed Aug 3, 2024
1 parent bc60c56 commit eef40f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ mklink /J localsend.portable ..\chocolatey-package-localsend.portable

Once created, simply run `update.ps1` from within the created directory/junction point. Assuming all goes well, all relevant files should change to reflect the latest version available. This will also build a new package version using the modified files.

To forcibly create an updated package (regardless of whether a new software version is available), pass the `-Force` switch:

```powershell
.\update.ps1 -Force
```

Before submitting a pull request, please [test the package](https://docs.chocolatey.org/en-us/community-repository/moderation/package-verifier#steps-for-each-package) using the [Chocolatey Testing Environment](https://github.com/chocolatey-community/chocolatey-test-environment) first.
4 changes: 3 additions & 1 deletion update.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[CmdletBinding()]
param([switch] $Force)
Import-Module au

$currentPath = (Split-Path $MyInvocation.MyCommand.Definition)
Expand Down Expand Up @@ -56,4 +58,4 @@ function global:au_SearchReplace {
}
}

Update-Package -ChecksumFor None -NoReadme
Update-Package -ChecksumFor None -Force:$Force -NoReadme

0 comments on commit eef40f9

Please sign in to comment.