You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
622 B
22 lines
622 B
2 years ago
|
$ErrorActionPreference = "Stop"
|
||
|
|
||
1 year ago
|
$gitIgnorePath = "$PSScriptRoot/.gitignore"
|
||
|
|
||
2 years ago
|
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 | `
|
||
1 year ago
|
Set-Content -Path $gitIgnorePath -Encoding utf8 -NoNewline
|
||
2 years ago
|
}
|
||
|
|
||
1 year ago
|
gig windows,jetbrains,csharp,macos,sonarqube
|
||
|
|
||
|
# Replace specific ignore patterns
|
||
|
$(Get-Content $gitIgnorePath) `
|
||
|
-replace '^\.idea', '**/.idea' `
|
||
|
| Set-Content -Path $gitIgnorePath
|