From fbb636feca75d6c52dcbbc43d0615d456963ea30 Mon Sep 17 00:00:00 2001 From: Kai Ru Date: Mon, 11 Nov 2024 12:22:51 +0800 Subject: [PATCH] fix src and tgt --- .githooks/pre-push.ps1 | 8 ++++---- .githooks/pre-push.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.githooks/pre-push.ps1 b/.githooks/pre-push.ps1 index 33a8ec147c3..4e3ce17588b 100644 --- a/.githooks/pre-push.ps1 +++ b/.githooks/pre-push.ps1 @@ -20,7 +20,7 @@ $currentBranch = git branch --show-current # Run command azdev lint Write-Host "Running azdev lint..." -ForegroundColor Green -azdev linter --repo ./ --tgt $currentBranch --src upstream/dev +azdev linter --repo ./ --src $currentBranch --tgt upstream/dev if ($LASTEXITCODE -ne 0) { Write-Host "Error: azdev lint check failed." -ForegroundColor Red exit 1 @@ -28,9 +28,9 @@ if ($LASTEXITCODE -ne 0) { # Run command azdev style Write-Host "Running azdev style..." -ForegroundColor Green -azdev style --repo ./ --tgt $currentBranch --src upstream/dev +azdev style --repo ./ --src $currentBranch --tgt upstream/dev if ($LASTEXITCODE -ne 0) { - $error_msg = azdev style --repo ./ --tgt $currentBranch --src upstream/dev 2>&1 + $error_msg = azdev style --repo ./ --src $currentBranch --tgt upstream/dev 2>&1 if ($error_msg -like "*No modules*") { Write-Host "Pre-push hook passed." -ForegroundColor Green exit 0 @@ -41,7 +41,7 @@ if ($LASTEXITCODE -ne 0) { # Run command azdev test Write-Host "Running azdev test..." -ForegroundColor Green -azdev test --repo ./ --tgt $currentBranch --src upstream/dev +azdev test --repo ./ --src $currentBranch --tgt upstream/dev if ($LASTEXITCODE -ne 0) { Write-Host "Error: azdev test check failed." -ForegroundColor Red exit 1 diff --git a/.githooks/pre-push.sh b/.githooks/pre-push.sh index 6e580147df7..7a2955bd36a 100644 --- a/.githooks/pre-push.sh +++ b/.githooks/pre-push.sh @@ -22,7 +22,7 @@ currentBranch=$(git branch --show-current) # Run command azdev lint echo "\033[0;32mRunning azdev lint...\033[0m" -azdev linter --repo ./ --tgt $currentBranch --src upstream/dev +azdev linter --repo ./ --src $currentBranch --tgt upstream/dev if [ $? -ne 0 ]; then echo "\033[0;31mError: azdev lint check failed.\033[0m" exit 1 @@ -30,9 +30,9 @@ fi # Run command azdev style echo "\033[0;32mRunning azdev style...\033[0m" -azdev style --repo ./ --tgt $currentBranch --src upstream/dev +azdev style --repo ./ --src $currentBranch --tgt upstream/dev if [ $? -ne 0 ]; then - error_msg=$(azdev style --repo ./ --tgt $currentBranch --src upstream/dev 2>&1) + error_msg=$(azdev style --repo ./ --src $currentBranch --tgt upstream/dev 2>&1) if echo "$error_msg" | grep -q "No modules"; then echo "\033[0;32mPre-push hook passed.\033[0m" exit 0 @@ -43,7 +43,7 @@ fi # Run command azdev test echo "\033[0;32mRunning azdev test...\033[0m" -azdev test --repo ./ --tgt $currentBranch --src upstream/dev +azdev test --repo ./ --src $currentBranch --tgt upstream/dev if [ $? -ne 0 ]; then echo "\033[0;31mError: azdev test check failed.\033[0m" exit 1