Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 23 additions & 21 deletions azure-pipelines/igniteui-wc-grid-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ stages:
fi
}

# Pass 1: All first-level directories in projects/
create_zips "$(Build.SourcesDirectory)/projects"
# Pass 1: All first-level directories in projects/grids/
create_zips "$(Build.SourcesDirectory)/projects/grids"

# Pass 2: All first-level directories in projects/charts/
create_zips "$(Build.SourcesDirectory)/projects/charts"
Expand Down Expand Up @@ -148,8 +148,12 @@ stages:
echo "Running Ignite UI package upgrade in all project subdirectories..."
for dir in $(Build.SourcesDirectory)/projects/*/; do
if [ -d "$dir" ]; then
echo "Processing: $dir"
(cd "$dir" && npx ig upgrade-packages --skip-install)
if [ -f "$dir/.igniteui-cli.json" ]; then
echo "Identify IgniteUI CLI-compatible project: $dir"
(cd "$dir" && npx ig upgrade-packages --skip-install)
else
echo "WARNING: Skipping $dir (not an Ignite UI CLI project)"
fi
fi
done

Expand All @@ -161,26 +165,24 @@ stages:
workingDir: '$(Build.SourcesDirectory)'
customCommand: 'install --legacy-peer-deps'

- task: PowerShell@2
displayName: 'Replace references to IG trial packages with licensed ones in TSX files'
- task: Bash@3
displayName: 'Replace references to IG trial packages with licensed ones in TSX/TS files'
inputs:
failOnStderr: true
showWarnings: true
workingDirectory: '$(Build.SourcesDirectory)'
targetType: 'inline'
script: |
Get-ChildItem -Include "*.tsx","*.ts" -Recurse | ForEach {
Write-Host "Processing file: $($_.FullName)"
$content = Get-Content $_.FullName
$updatedContent = $content | ForEach-Object {
$_ -replace '(from|import)\s?[''"](igniteui-webcomponents-[^''"]+|dockmanager.*)[''"]', '$1 "@infragistics/$2"'
}

if ($updatedContent -ne $content) {
Write-Host "Replacements applied in: $($_.FullName)"
$updatedContent | Set-Content $_.FullName
}
}
set -eo pipefail
echo "Replacing IG trial package imports with licensed ones..."

# Process each file with logging
find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \
! -path "*/node_modules/*" -print0 |
xargs -0 -n 1 bash -c '
file="$1"
echo "Processing $file"
sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-webcomponents-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file"
' _

echo "All references updated."

- task: Npm@1
displayName: 'npm run build:ci'
Expand Down
Loading