Skip to content

Commit fbb636f

Browse files
committed
fix src and tgt
1 parent 0a2f946 commit fbb636f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.githooks/pre-push.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ $currentBranch = git branch --show-current
2020

2121
# Run command azdev lint
2222
Write-Host "Running azdev lint..." -ForegroundColor Green
23-
azdev linter --repo ./ --tgt $currentBranch --src upstream/dev
23+
azdev linter --repo ./ --src $currentBranch --tgt upstream/dev
2424
if ($LASTEXITCODE -ne 0) {
2525
Write-Host "Error: azdev lint check failed." -ForegroundColor Red
2626
exit 1
2727
}
2828

2929
# Run command azdev style
3030
Write-Host "Running azdev style..." -ForegroundColor Green
31-
azdev style --repo ./ --tgt $currentBranch --src upstream/dev
31+
azdev style --repo ./ --src $currentBranch --tgt upstream/dev
3232
if ($LASTEXITCODE -ne 0) {
33-
$error_msg = azdev style --repo ./ --tgt $currentBranch --src upstream/dev 2>&1
33+
$error_msg = azdev style --repo ./ --src $currentBranch --tgt upstream/dev 2>&1
3434
if ($error_msg -like "*No modules*") {
3535
Write-Host "Pre-push hook passed." -ForegroundColor Green
3636
exit 0
@@ -41,7 +41,7 @@ if ($LASTEXITCODE -ne 0) {
4141

4242
# Run command azdev test
4343
Write-Host "Running azdev test..." -ForegroundColor Green
44-
azdev test --repo ./ --tgt $currentBranch --src upstream/dev
44+
azdev test --repo ./ --src $currentBranch --tgt upstream/dev
4545
if ($LASTEXITCODE -ne 0) {
4646
Write-Host "Error: azdev test check failed." -ForegroundColor Red
4747
exit 1

.githooks/pre-push.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ currentBranch=$(git branch --show-current)
2222

2323
# Run command azdev lint
2424
echo "\033[0;32mRunning azdev lint...\033[0m"
25-
azdev linter --repo ./ --tgt $currentBranch --src upstream/dev
25+
azdev linter --repo ./ --src $currentBranch --tgt upstream/dev
2626
if [ $? -ne 0 ]; then
2727
echo "\033[0;31mError: azdev lint check failed.\033[0m"
2828
exit 1
2929
fi
3030

3131
# Run command azdev style
3232
echo "\033[0;32mRunning azdev style...\033[0m"
33-
azdev style --repo ./ --tgt $currentBranch --src upstream/dev
33+
azdev style --repo ./ --src $currentBranch --tgt upstream/dev
3434
if [ $? -ne 0 ]; then
35-
error_msg=$(azdev style --repo ./ --tgt $currentBranch --src upstream/dev 2>&1)
35+
error_msg=$(azdev style --repo ./ --src $currentBranch --tgt upstream/dev 2>&1)
3636
if echo "$error_msg" | grep -q "No modules"; then
3737
echo "\033[0;32mPre-push hook passed.\033[0m"
3838
exit 0
@@ -43,7 +43,7 @@ fi
4343

4444
# Run command azdev test
4545
echo "\033[0;32mRunning azdev test...\033[0m"
46-
azdev test --repo ./ --tgt $currentBranch --src upstream/dev
46+
azdev test --repo ./ --src $currentBranch --tgt upstream/dev
4747
if [ $? -ne 0 ]; then
4848
echo "\033[0;31mError: azdev test check failed.\033[0m"
4949
exit 1

0 commit comments

Comments
 (0)