Skip to content

Commit fddec92

Browse files
Move git auth out of optional setup function
1 parent 89ce742 commit fddec92

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

check.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ function InitialSetup() {
4242
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
4343
Install-Module -Name powershell-yaml -AcceptLicense
4444
Import-Module powershell-yaml
45-
Invoke-NativeCommand gh auth setup-git
46-
Invoke-NativeCommand git config --global user.email "kieseljake+rust-winget-bot@live.com"
47-
Invoke-NativeCommand git config --global user.name "Rust-Winget-Bot"
4845
Invoke-NativeCommand gh repo sync "Rust-Winget-Bot/winget-pkgs"
4946
Invoke-NativeCommand gh repo clone "Rust-Winget-Bot/winget-pkgs" "--" --depth 1
5047
Set-Location winget-pkgs
@@ -70,6 +67,9 @@ $yamlHeaderVersion = @'
7067
7168
'@
7269
$initialSetupExecuted = $false
70+
Invoke-NativeCommand gh auth setup-git
71+
Invoke-NativeCommand git config --global user.email "kieseljake+rust-winget-bot@live.com"
72+
Invoke-NativeCommand git config --global user.name "Rust-Winget-Bot"
7373
$lastFewVersions = Invoke-NativeCommand git ls-remote --sort=-v:refname --tags https://github.com/rust-lang/rust.git
7474
| Select-String -Pattern "refs/tags/(\d+?\.\d+?\.\d+?$)"
7575
| ForEach-Object { $_.Matches[0].Groups[1].Value }

0 commit comments

Comments
 (0)