You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-Host"Your $AZURE_CLI_FOLDER repo code is not up to date with upstream/dev. Please run the following commands to rebase and setup:"-ForegroundColor Yellow
Write-Host"Running azdev setup..."-ForegroundColor Green
88
+
if ($Extensions) {
89
+
azdev setup -c $AZURE_CLI_FOLDER-r $Extensions
90
+
} else {
91
+
azdev setup -c $AZURE_CLI_FOLDER
92
+
}
93
+
if ($LASTEXITCODE-ne0) {
94
+
Write-Host"azdev setup failed. Please check your environment."-ForegroundColor Red
95
+
exit1
96
+
}
97
+
Write-Host"Setup completed successfully."-ForegroundColor Green
98
+
} elseif ($input-match'^[Nn]$') {
99
+
Write-Host"Skipping rebase and setup. Continue push..."-ForegroundColor Red
100
+
} else {
101
+
Write-Host"Invalid input. Aborting push..."-ForegroundColor Red
102
+
exit1
77
103
}
78
-
Write-Host"`rContinuing without rebase..."
79
104
}
80
105
}
81
106
@@ -142,19 +167,4 @@ if ($LASTEXITCODE -ne 0) {
142
167
}
143
168
144
169
Write-Host"Pre-push hook passed."-ForegroundColor Green
145
-
146
-
if ($AZURE_CLI_FOLDER) {
147
-
if ($cliMergeBase-ne$cliUpstreamHead) {
148
-
Write-Host""
149
-
Write-Host"Your $AZURE_CLI_FOLDER repo code is not up to date with upstream/dev. Please run the following commands to rebase and setup:"-ForegroundColor Yellow
if [ "$CLI_MERGE_BASE"!="$CLI_UPSTREAM_HEAD" ];then
57
59
printf"\n"
58
-
printf"\033[0;33mYour %s repo code is not up to date with upstream/dev. Please run the following commands to rebase and setup:\033[0m\n""$AZURE_CLI_FOLDER"
if [ "$CLI_MERGE_BASE"!="$CLI_UPSTREAM_HEAD" ];then
141
-
printf"\n"
142
-
printf"\033[0;33mYour %s repo code is not up to date with upstream/dev. Please run the following commands to rebase and setup:\033[0m\n""$AZURE_CLI_FOLDER"
0 commit comments