Skip to content

Commit 52e34d3

Browse files
Update files
1 parent f4aa66f commit 52e34d3

File tree

8 files changed

+242
-8
lines changed

8 files changed

+242
-8
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* text=auto eol=lf
2+
13
VB/* linguist-vendored
24
scripts linguist-vendored
35
*.css linguist-detectable=false

ASP.NET Core/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Download the example and use Visual Studio 2019 to open the project.
66

77
## Client-side resources and bundling
88

9-
This project uses [NPM](http://npmjs.com/) and [Gulp.js](https://gulpjs.com/) to install client-side libraries. The project restores NPM packages before the first build. Then, Gulp bundles required scripts and CSS files into the resulting package during the first and every next build.
9+
This project uses [NPM](https://www.npmjs.com/) and [Gulp.js](https://gulpjs.com/) to install client-side libraries. The project restores NPM packages before the first build. Then, Gulp bundles required scripts and CSS files into the resulting package during the first and every next build.
1010

1111
The resulted bundles will be located in the `wwwroot` folder:
1212
* `css/vendor.css` - a file with all CSS styles.

Angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u
2424

2525
## Further help
2626

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://v17.angular.io/cli) page.
2828
To get more help on DevExtreme submit an issue on [GitHub](https://github.com/DevExpress/devextreme/issues) or [Support Center](https://www.devexpress.com/Support/Center/Question/Create)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This example demonstrates how to implement the following scenarios in DataGrid:
4545

4646
## More Examples
4747

48-
- [DataGrid - How to implement a custom editing form using dxForm and dxPopup](https://github.com/DevExpress-Examples/DataGrid-How-to-implement-a-custom-editing-form-using-dxForm-and-dxPopup)
48+
- [DataGrid - How to implement a custom editing form using dxForm and dxPopup](https://github.com/DevExpress-Examples/devextreme-datagrid-custom-editing-form)
4949
<!-- feedback -->
5050
## Does this example address your development requirements/objectives?
5151

React/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ It correctly bundles React in production mode and optimizes the build for the be
2626
The build is minified and the filenames include the hashes.<br>
2727
Your app is ready to be deployed!
2828

29-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29+
See the section about [deployment](https://create-react-app.dev/docs/deployment/) for more information.
3030

3131
## Further help
3232

33-
You can learn more about React in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
33+
You can learn more about React in the [Create React App documentation](https://create-react-app.dev/docs/getting-started/).
3434

3535
To get more help on DevExtreme submit an issue on [GitHub](https://github.com/DevExpress/devextreme/issues) or [Support Center](https://www.devexpress.com/Support/Center/Question/Create)
3636

Vue/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This template should help get you started developing with Vue 3 in Vite.
1010

1111
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
1212

13-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
13+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/vuejs/language-tools/discussions/471) that is more performant. You can enable it by the following steps:
1414

1515
1. Disable the built-in TypeScript Extension
1616
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
@@ -19,7 +19,7 @@ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has a
1919

2020
## Customize configuration
2121

22-
See [Vite Configuration Reference](https://vitejs.dev/config/).
22+
See [Vite Configuration Reference](https://vite.dev/config/).
2323

2424
## Project Setup
2525

jQuery/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"version": "1.0.0",
44
"scripts": {
55
"start": "npm run lite",
6-
"lite": "lite-server -c ./bs-config.json"
6+
"lite": "lite-server -c ./bs-config.json",
7+
"build": "npm run lint"
78
},
89
"devDependencies": {
910
"eslint": "^8.33.0",

test-example.ps1

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# For local testing, you can pass branchName and/or buildVersion.
2+
# If both parameters are specified, only buildVersion will be used.
3+
# Example usage:
4+
# ./test-example.ps1 -branchName 23.1.3+
5+
# ./test-example.ps1 -buildVersion 23.1.13
6+
param (
7+
[string]$branchName = [Environment]::GetEnvironmentVariable("BRANCH_NAME", [EnvironmentVariableTarget]::Machine),
8+
[string]$buildVersion = [Environment]::GetEnvironmentVariable("BUILD_VERSION", [EnvironmentVariableTarget]::Machine)
9+
)
10+
11+
# Repository's branch name, e.g. 24.1.3+
12+
$global:BRANCH_NAME = $branchName
13+
# Masstest-specific parameter. Specifies the minor version (example: '21.1.5') !or daily build (example: '21.2.2005')
14+
$global:BUILD_VERSION = $buildVersion
15+
16+
$global:ERROR_CODE = 0
17+
$global:FAILED_PROJECTS = @()
18+
19+
$global:ALL_VERSIONS = @(
20+
"14.1", "14.2",
21+
"15.1", "15.2",
22+
"16.1", "16.2",
23+
"17.1", "17.2",
24+
"18.1", "18.2",
25+
"19.1", "19.2",
26+
"20.1", "20.2",
27+
"21.1", "21.2",
28+
"22.1", "22.2",
29+
"23.1", "23.2",
30+
"24.1", "24.2",
31+
"25.1", "25.2"
32+
)
33+
34+
function Install-Packages {
35+
param (
36+
[string]$folderName,
37+
[string[]]$packages,
38+
[string]$buildVersion
39+
)
40+
Write-Output "`nInstalling packages in folder: $folderName"
41+
42+
$packageList = $packages | ForEach-Object { "$_@$buildVersion" }
43+
Write-Output "`nPackages to install: $($packageList -join ", ")"
44+
# TODO: Uninstall DevExtreme packages to avoid potential peer-dependency issues
45+
npm install @($packageList) --save --save-exact --no-fund
46+
if (-not $?) {
47+
Write-Error "`nERROR: Failed to install DevExtreme packages in $folderName"
48+
throw "Installation failed in $folderName"
49+
}
50+
}
51+
52+
function Build-Project {
53+
param (
54+
[string]$folderName
55+
)
56+
Write-Output "`nBuilding the project in folder: $folderName"
57+
58+
npm run build
59+
if (-not $?) {
60+
Write-Error "`nERROR: Failed to build the project in $folderName"
61+
throw "Build failed in $folderName"
62+
}
63+
}
64+
65+
function Process-JavaScriptProjects {
66+
param (
67+
[string]$buildVersion
68+
)
69+
Write-Output "`n--== Starting JavaScript Projects Processing ==--"
70+
71+
[hashtable[]]$folders = @(
72+
@{ Name = "Angular"; Packages = @("devextreme", "devextreme-angular") },
73+
@{ Name = "React"; Packages = @("devextreme", "devextreme-react") },
74+
@{ Name = "Vue"; Packages = @("devextreme", "devextreme-vue") }
75+
)
76+
77+
$jQueryEntry = @{
78+
Name = "jQuery";
79+
Packages = if ([version]$buildVersion -ge [version]23.1) { # `devextreme-dist` appeared in 23.1
80+
@("devextreme", "devextreme-dist")
81+
} else {
82+
@("devextreme")
83+
}
84+
}
85+
86+
$folders = @($jQueryEntry) + $folders
87+
88+
foreach ($folder in $folders) {
89+
$folderName = $folder.Name
90+
$packages = $folder.Packages
91+
92+
if (-not (Test-Path $folderName)) {
93+
Write-Output "`nDirectory $folderName does not exist. Skipping..."
94+
continue
95+
}
96+
97+
Write-Output "`nProcessing folder: $folderName"
98+
Push-Location $folderName
99+
100+
try {
101+
Install-Packages -folderName $folderName -packages $packages -buildVersion $buildVersion
102+
Write-Output "`nInstalling remaining packages in $folderName"
103+
npm install --save --save-exact --no-fund --loglevel=error
104+
if (-not $?) {
105+
throw "ERROR: Failed to install remaining packages in $folderName"
106+
}
107+
Build-Project -folderName $folderName
108+
} catch {
109+
Write-Error "`nAn error occurred: $_"
110+
$global:LASTEXITCODE = 1
111+
$global:ERROR_CODE = 1
112+
$global:FAILED_PROJECTS += $folderName
113+
} finally {
114+
Pop-Location
115+
}
116+
}
117+
118+
Write-Output "`n--== JavaScript Projects Processing Completed ==--"
119+
}
120+
121+
function Process-DotNetProjects {
122+
param (
123+
[string]$RootDirectory = "."
124+
)
125+
126+
Write-Output "`n--== Starting .NET project processing in directory: $RootDirectory ==--"
127+
128+
$slnFiles = Get-ChildItem -Path $RootDirectory -Filter *.sln -Recurse -Depth 1
129+
130+
if ($slnFiles.Count -eq 0) {
131+
Write-Output "`nNo solution files (.sln) found in the specified directory at level 1."
132+
return
133+
}
134+
135+
foreach ($slnFile in $slnFiles) {
136+
Write-Output "`nFound solution file: $($slnFile.FullName)"
137+
138+
try {
139+
Write-Output "`nBuilding solution: $($slnFile.FullName)"
140+
dotnet build $slnFile.FullName -c Release
141+
142+
if ($?) {
143+
Write-Output "`nBuild succeeded for $($slnFile.FullName)."
144+
} else {
145+
throw "Build failed for $($slnFile.FullName)."
146+
}
147+
} catch {
148+
Write-Error "`nERROR: $_"
149+
$global:LASTEXITCODE = 1
150+
$global:ERROR_CODE = 1
151+
$global:FAILED_PROJECTS += "ASP.NET"
152+
}
153+
}
154+
155+
Write-Output "`nCompleted .NET project processing."
156+
}
157+
158+
function Set-BuildVersion {
159+
Write-Output "`n--== Starting Set-BuildVersion process. ==--"
160+
161+
$BUILD_VERSION = $global:BUILD_VERSION
162+
if ($BUILD_VERSION) {
163+
Write-Output "BUILD_VERSION is already set: $BUILD_VERSION"
164+
return
165+
}
166+
167+
$BUILD_VERSIONS_LIST = "BUILD_VERSIONS_LIST"
168+
169+
$inputMajorMinor = $global:BRANCH_NAME -replace "\.\d+\+$", ""
170+
Write-Output "Extracted major.minor version from branch name: $inputMajorMinor"
171+
172+
$filteredList = $global:ALL_VERSIONS | Where-Object {
173+
($_ -replace "\." -as [double]) -ge ($inputMajorMinor -replace "\." -as [double])
174+
}
175+
Write-Output "Filtered versions list: $filteredList"
176+
177+
$currentValue = [Environment]::GetEnvironmentVariable($BUILD_VERSIONS_LIST, [EnvironmentVariableTarget]::Machine)
178+
$currentList = if ($currentValue) {
179+
$currentValue -split ";"
180+
} else {
181+
$filteredList
182+
}
183+
Write-Output "Current versions list: $currentList"
184+
185+
if ($currentList.Count -gt 1) {
186+
$inputMajorMinor = $currentList[0]
187+
$updatedList = $currentList[1..($currentList.Count - 1)]
188+
} else {
189+
Write-Output "The list in the environment variable has only one item."
190+
$inputMajorMinor = $currentList[0]
191+
$updatedList = @()
192+
}
193+
194+
$global:BUILD_VERSION = $inputMajorMinor
195+
Write-Output "BUILD_VERSION set to: $global:BUILD_VERSION"
196+
197+
$newValue = $updatedList -join ";"
198+
[Environment]::SetEnvironmentVariable($BUILD_VERSIONS_LIST, $newValue, [EnvironmentVariableTarget]::Machine)
199+
200+
Write-Output "Environment variable '$BUILD_VERSIONS_LIST' updated."
201+
Write-Output "New list: $updatedList"
202+
}
203+
204+
function Write-BuildInfo {
205+
$BRANCH_NAME = if ($global:BRANCH_NAME -ne $null -and $global:BRANCH_NAME -ne "") {
206+
$global:BRANCH_NAME
207+
} else {
208+
"(empty)"
209+
}
210+
211+
$BUILD_VERSION = if ($global:BUILD_VERSION -ne $null -and $global:BUILD_VERSION -ne "") {
212+
$global:BUILD_VERSION
213+
} else {
214+
"(empty)"
215+
}
216+
217+
Write-Output "`nBranch Name: $BRANCH_NAME"
218+
Write-Output "Build Version: $BUILD_VERSION"
219+
}
220+
221+
Write-BuildInfo
222+
Set-BuildVersion
223+
Process-JavaScriptProjects -buildVersion $global:BUILD_VERSION
224+
Process-DotNetProjects
225+
226+
Write-Output "`nFinished testing version: $global:BUILD_VERSION. Error code: $global:ERROR_CODE"
227+
if ($global:ERROR_CODE -ne 0 -and $global:FAILED_PROJECTS.Count -gt 0) {
228+
Write-Output "`FAILED PROJECTS: $(($global:FAILED_PROJECTS -join ", "))"
229+
}
230+
231+
exit $global:ERROR_CODE

0 commit comments

Comments
 (0)