diff --git a/cli/azd/extensions/azure.ai.agents/README.md b/cli/azd/extensions/azure.ai.agents/README.md index 0e4b081398c..0b4b9dd8a1f 100644 --- a/cli/azd/extensions/azure.ai.agents/README.md +++ b/cli/azd/extensions/azure.ai.agents/README.md @@ -32,20 +32,6 @@ azd x publish ``` - > **Troubleshooting**: If `azd x publish` fails with "(Failed to load registry)": - > 1. Create the registry file (needs to be valid JSON): - > ```bash - > echo '{}' > ~/.azd/registry.json - > ``` - > 2. Add the local registry as a source: - > ```bash - > azd ext source add -n local -l registry.json -t file - > ``` - > 3. Retry the publish command: - > ```bash - > azd x publish - > ``` - 3. **Install the extension**: ```bash azd ext install azure.ai.agents diff --git a/cli/azd/extensions/microsoft.azd.extensions/README.md b/cli/azd/extensions/microsoft.azd.extensions/README.md index 195563d05aa..a942bb41ef5 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/README.md +++ b/cli/azd/extensions/microsoft.azd.extensions/README.md @@ -1,3 +1,13 @@ # `azd` X Extension The `X` extension is used for developing `azd` extensions. + +## Local development + +```bash +# Use current version of 'microsoft.azd.extensions' in the registry for bootstrapping +azd x build --skip-install + +# Perform a manual installation +cp -f bin/* ~/.azd/extensions/microsoft.azd.extensions/ +``` diff --git a/cli/azd/extensions/microsoft.azd.extensions/build-orig.sh b/cli/azd/extensions/microsoft.azd.extensions/build-orig.sh deleted file mode 100644 index 399828dd130..00000000000 --- a/cli/azd/extensions/microsoft.azd.extensions/build-orig.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -# Get the directory of the script -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" - -# Change to the script directory -cd "$SCRIPT_DIR" || exit - -# Parse named input parameters: --app-name and --version -while [[ "$#" -gt 0 ]]; do - case $1 in - --app-name) - APP_NAME="$2" - shift 2 - ;; - --version) - VERSION="$2" - shift 2 - ;; - *) - echo "Unknown parameter passed: $1" - exit 1 - ;; - esac -done - -if [ -z "$APP_NAME" ]; then - echo "Error: --app-name parameter is required" - exit 1 -fi - -if [ -z "$VERSION" ]; then - echo "Error: --version parameter is required" - exit 1 -fi - -# Create a safe version of APP_NAME replacing dots with dashes -APP_NAME_SAFE="${APP_NAME//./-}" - -# Define output directory -OUTPUT_DIR="$SCRIPT_DIR/bin" - -# Create output and target directories if they don't exist -mkdir -p "$OUTPUT_DIR" -mkdir -p "$HOME/.azd/extensions/$APP_NAME" # new: create destination directory - -# Get Git commit hash and build date -COMMIT=$(git rev-parse HEAD) -BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) - -# List of OS and architecture combinations -PLATFORMS=( - "windows/amd64" -) - -APP_PATH="github.com/azure/azure-dev/cli/azd/extensions/$APP_NAME/internal/cmd" - -# Loop through platforms and build -for PLATFORM in "${PLATFORMS[@]}"; do - OS=$(echo "$PLATFORM" | cut -d'/' -f1) - ARCH=$(echo "$PLATFORM" | cut -d'/' -f2) - - OUTPUT_NAME="$OUTPUT_DIR/$APP_NAME_SAFE-$OS-$ARCH" - - if [ "$OS" = "windows" ]; then - OUTPUT_NAME+='.exe' - fi - - echo "Building for $OS/$ARCH..." - GOOS=$OS GOARCH=$ARCH go build \ - -ldflags="-X '$APP_PATH.Version=$VERSION' -X '$APP_PATH.Commit=$COMMIT' -X '$APP_PATH.BuildDate=$BUILD_DATE'" \ - -o "$OUTPUT_NAME" - - if [ $? -ne 0 ]; then - echo "An error occurred while building for $OS/$ARCH" - exit 1 - fi - - # new: copy built binary to extensions folder - cp "$OUTPUT_NAME" "$HOME/.azd/extensions/$APP_NAME" -done - -echo "Build completed successfully!" -echo "Binaries are located in the $OUTPUT_DIR directory." diff --git a/cli/azd/extensions/microsoft.azd.extensions/internal/cmd/watch.go b/cli/azd/extensions/microsoft.azd.extensions/internal/cmd/watch.go index 64563e5eabd..5f2bf26b2d0 100644 --- a/cli/azd/extensions/microsoft.azd.extensions/internal/cmd/watch.go +++ b/cli/azd/extensions/microsoft.azd.extensions/internal/cmd/watch.go @@ -56,6 +56,7 @@ func runWatchAction(ctx context.Context, flags *watchFlags) error { "obj": {}, "build": {}, "node_modules": {}, + ".git": {}, } globIgnorePaths := []string{}