Skip to content

Commit ec3b7dd

Browse files
authored
Merge pull request #44 from IgniteUI/vnext
Push to prod
2 parents eaccf9a + ea6e995 commit ec3b7dd

File tree

94 files changed

+14584
-622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+14584
-622
lines changed

azure-pipelines/igniteui-wc-grid-examples.yml

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,41 +43,46 @@ stages:
4343
inputs:
4444
targetType: 'inline'
4545
script: |
46-
# Define the root path where projects are located
47-
rootPath="$(Build.SourcesDirectory)/projects"
48-
49-
# Get all first-level subdirectories in the specified root path
50-
subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d)
51-
52-
for subdirectory in $subdirectories; do
53-
# Extract the directory name from the path
54-
dirName=$(basename "$subdirectory")
55-
56-
# Give each sample a version in its package.json file - for traceability
57-
cd "$subdirectory"
58-
echo "Calling npm version command"
59-
npm version $(Build.BuildNumber) --no-git-tag-version
60-
61-
# Check if the directory name is already camel-case
62-
if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then
63-
# If already camel-case, print it as is
64-
echo "$dirName"
65-
else
66-
# Convert to camel-case (capitalize first letters and remove hyphens)
67-
dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g')
68-
69-
fi
70-
71-
echo "Processing directory: $dirName"
72-
73-
# Define the name for the zip file
74-
zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_WebComponents_ApplicationSample_${dirName}_Source.zip"
75-
echo "Creating ZIP: $zipName"
76-
77-
# Compress the directory into a ZIP file
78-
(cd "$subdirectory" && zip -r "$zipName" .)
79-
done
80-
46+
create_zips() {
47+
local rootPath="$1"
48+
if [ -d "$rootPath" ]; then
49+
# Get all first-level subdirectories in the specified root path
50+
subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d)
51+
for subdirectory in $subdirectories; do
52+
# Extract the directory name from the path
53+
dirName=$(basename "$subdirectory")
54+
55+
# Give each sample a version in its package.json file - for traceability
56+
cd "$subdirectory"
57+
echo "Setting project version in package.json to $(Build.BuildNumber) for $dirName"
58+
npm version $(Build.BuildNumber) --no-git-tag-version
59+
60+
# Check if the directory name is already camel-case
61+
if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then
62+
# If already camel-case, print it as is
63+
echo "$dirName"
64+
else
65+
# Convert to camel-case (capitalize first letters and remove hyphens)
66+
dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g')
67+
fi
68+
69+
echo "Processing directory: $dirName"
70+
# Define the name for the zip file
71+
zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_WebComponents_ApplicationSample_${dirName}_Source.zip"
72+
echo "Creating ZIP: $zipName"
73+
74+
# Compress the directory into a ZIP file
75+
(cd "$subdirectory" && zip -r "$zipName" .)
76+
done
77+
fi
78+
}
79+
80+
# Pass 1: All first-level directories in projects/
81+
create_zips "$(Build.SourcesDirectory)/projects"
82+
83+
# Pass 2: All first-level directories in projects/charts/
84+
create_zips "$(Build.SourcesDirectory)/projects/charts"
85+
8186
echo "All sample projects have been compressed and saved to the artifacts directory."
8287
8388
- task: PublishPipelineArtifact@1
@@ -156,6 +161,27 @@ stages:
156161
workingDir: '$(Build.SourcesDirectory)'
157162
customCommand: 'install --legacy-peer-deps'
158163

164+
- task: PowerShell@2
165+
displayName: 'Replace references to IG trial packages with licensed ones in TSX files'
166+
inputs:
167+
failOnStderr: true
168+
showWarnings: true
169+
workingDirectory: '$(Build.SourcesDirectory)'
170+
targetType: 'inline'
171+
script: |
172+
Get-ChildItem -Include "*.tsx","*.ts" -Recurse | ForEach {
173+
Write-Host "Processing file: $($_.FullName)"
174+
$content = Get-Content $_.FullName
175+
$updatedContent = $content | ForEach-Object {
176+
$_ -replace '(from|import)\s?[''"](igniteui-webcomponents-[^''"]+|dockmanager.*)[''"]', '$1 "@infragistics/$2"'
177+
}
178+
179+
if ($updatedContent -ne $content) {
180+
Write-Host "Replacements applied in: $($_.FullName)"
181+
$updatedContent | Set-Content $_.FullName
182+
}
183+
}
184+
159185
- task: Npm@1
160186
displayName: 'npm run build:ci'
161187
inputs:

0 commit comments

Comments
 (0)