chore: Introduce script to update .gitignore

commitlint
Robert Dailey 2 years ago
parent 97d229d1f6
commit 934dc65d3c

@ -110,3 +110,9 @@ The Github Workflows manage the release process after the push by doing the foll
[release]: https://github.com/recyclarr/recyclarr/releases
[ghcr]: https://github.com/recyclarr/recyclarr/pkgs/container/recyclarr
[discord]: https://discord.com/invite/Vau8dZ3
## Update `.gitignore`
Execute the `Update-Gitignore.ps1` script using Powershell. The working directory *must* be the root
of the repo. This will pull the latest relevant `.gitignore` patterns from
[gitignore.io](https://gitignore.io) and commit them automatically to your current branch.

@ -0,0 +1,15 @@
$ErrorActionPreference = "Stop"
Function gig {
param(
[Parameter(Mandatory=$true)]
[string[]]$list
)
$params = ($list | ForEach-Object { [uri]::EscapeDataString($_) }) -join ","
Invoke-WebRequest -Uri "https://www.toptal.com/developers/gitignore/api/$params" | `
Select-Object -ExpandProperty content | `
Out-File -FilePath $(Join-Path -path $pwd -ChildPath ".gitignore") -Encoding ascii
}
gig windows,rider,csharp
git commit -m 'chore(git): Latest .gitignore from gitignore.io' -- .gitignore
Loading…
Cancel
Save