Skip to content

Commit

Permalink
fix issue in pre-push.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kairu-ms committed Nov 12, 2024
1 parent fd61417 commit 2e90126
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .githooks/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ MERGE_BASE=$(git merge-base HEAD upstream/main)
currentBranch=$(git branch --show-current)

# Detect changed extensions
printf "\033[0;32mDetecting changed extensions...\033[0m\n"
changedFiles=$(git diff --name-only $MERGE_BASE $currentBranch)
changedExtensions=$(echo "$changedFiles" | grep "^src/" | cut -d'/' -f2 | sort -u)

if [ ! -z "$changedExtensions" ]; then
printf "\033[0;32mChanged extensions: %s\033[0m\n" "$(echo $changedExtensions | tr '\n' ', ')"

# Add each changed extension using azdev extension add
for extension in $changedExtensions; do
printf "\033[0;32mAdding extension: %s\033[0m\n" "$extension"
printf "Adding extension: %s\n" "$extension"
azdev extension add "$extension"
if [ $? -ne 0 ]; then
printf "\033[0;31mError: Failed to add extension %s\033[0m\n" "$extension"
Expand Down
2 changes: 1 addition & 1 deletion src/apic-extension/azext_apic_extension/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def load_arguments(self, _): # pylint: disable=unused-argument
#

with self.argument_context("apic api register") as c:
c.argument(
"api_location",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


def load_arguments(self, _):
#

with self.argument_context('monitor app-insights') as c:
c.argument('application', options_list=['--app', '-a'], id_part='name', help='GUID, app name, or fully-qualified Azure resource name of Application Insights component. The application GUID may be acquired from the API Access menu item on any Application Insights resource in the Azure portal. If using an application name, please specify resource group.')

Expand Down

0 comments on commit 2e90126

Please sign in to comment.