From 8822f1facca58aae0c442769bc97f245928d9825 Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Wed, 18 Oct 2023 17:50:45 +0400 Subject: [PATCH 01/18] Create script for setting the same version in all packages in monorepo --- .github/workflows/bump_version.yml | 43 ++++++++++++++++++++++++++++++ build/bump-version.ts | 18 +++++++++++++ build/pack-all.ts | 13 +++++---- package.json | 3 ++- 4 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/bump_version.yml create mode 100644 build/bump-version.ts diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml new file mode 100644 index 000000000000..3851460dd08e --- /dev/null +++ b/.github/workflows/bump_version.yml @@ -0,0 +1,43 @@ +name: Bump version + +on: + workflow_dispatch: + inputs: + branch_name: + type: string + description: XX_X (23_2+) + required: true + +jobs: + build: + runs-on: devextreme-shr2 + + steps: + - name: Get sources + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch_name }} + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.16.1' + + - name: Install packages in devextreme repo + run: npm install --no-audit --no-fund + + - name: Bump version + run: npm run all:bump + + - name: Commit changes and make PR + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} + branch_name: 'robot/bump-version-${{ inputs.branch_name }}' + run: | + git checkout -b $branch_name + git add . -N + git commit -a -m "Bump devextreme version" + git push --set-upstream origin $branch_name --force + gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.branch_name }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops + diff --git a/build/bump-version.ts b/build/bump-version.ts new file mode 100644 index 000000000000..d38aa6d2e6e0 --- /dev/null +++ b/build/bump-version.ts @@ -0,0 +1,18 @@ +import sh from "shelljs"; +import path from "node:path"; + +const version = process.argv[2]; + +const MONOREPO_ROOT = path.join(__dirname, '..'); +const packagesPath = path.join(MONOREPO_ROOT, 'packages', '**', 'package.json'); +const playgroundsPath = path.join(MONOREPO_ROOT, 'playgrounds', '**', 'package.json'); + +sh.exec(`npm version ${version} -ws --workspaces-update=false`); + +const setStrictVersion = /.*-(build|alpha|beta).*/.test(version); + +if (setStrictVersion) { + sh.sed('-i', /"devextreme(-angular|-react|-vue)?": ".*"/, `"devextreme$1": "${version}"`, [packagesPath, playgroundsPath]); +} + +sh.exec('npm i'); diff --git a/build/pack-all.ts b/build/pack-all.ts index 3e1f9e8d09d1..92869146e61e 100644 --- a/build/pack-all.ts +++ b/build/pack-all.ts @@ -23,14 +23,13 @@ sh.exec('npm run devextreme:inject-descriptions'); sh.exec('npm run build-dist -w devextreme-main'); -const DEVEXTREME_NPM_DIR = path.join(MONOREPO_ROOT, 'packages/devextreme/artifacts/npm'); +// bump version if needed +const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); +if (devextremeVersion !== devextremeNpmVersion) { + sh.exec(`npm run all:bump -- ${devextremeNpmVersion}`); +} -/* -TODO: We might need this when running on farm to bump non-semver versions for all packages. -sh.exec(`npm version ${version} -ws --workspaces-update=false`); -sh.sed('-i', /"devextreme": ".*"/, `"devextreme": "${version}"`, path.join(MONOREPO_ROOT, 'packages', '**', 'package.json')); -sh.exec('npm i'); -*/ +const DEVEXTREME_NPM_DIR = path.join(MONOREPO_ROOT, 'packages/devextreme/artifacts/npm'); sh.pushd(path.join(DEVEXTREME_NPM_DIR, 'devextreme')) sh.exec('npm pack'); diff --git a/package.json b/package.json index cad8c26cf3a1..2fa215ec6e55 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "regenerate-all": "nx run-many -t regenerate", "lint-staged": "lint-staged", "prepare": "husky install", - "all:pack": "ts-node build/pack-all.ts" + "all:pack": "ts-node build/pack-all.ts", + "all:bump": "ts-node build/bump-version.ts" }, "nx": {}, "private": true, From e45e91242749429ded6962feaf293fe4481e9f3a Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Wed, 18 Oct 2023 18:05:02 +0400 Subject: [PATCH 02/18] Include workspace root in script. Input version in workflow --- .github/workflows/bump_version.yml | 6 +++++- build/bump-version.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 3851460dd08e..a0c8d97c9098 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -7,6 +7,10 @@ on: type: string description: XX_X (23_2+) required: true +#TODO: increment version on branch or set exact version from inputs?? + version: + type: string + description: XX.X.X Set exact version (optional) jobs: build: @@ -27,7 +31,7 @@ jobs: run: npm install --no-audit --no-fund - name: Bump version - run: npm run all:bump + run: npm run all:bump -- ${{ inputs.version }} - name: Commit changes and make PR shell: bash diff --git a/build/bump-version.ts b/build/bump-version.ts index d38aa6d2e6e0..1687215e34c6 100644 --- a/build/bump-version.ts +++ b/build/bump-version.ts @@ -7,7 +7,7 @@ const MONOREPO_ROOT = path.join(__dirname, '..'); const packagesPath = path.join(MONOREPO_ROOT, 'packages', '**', 'package.json'); const playgroundsPath = path.join(MONOREPO_ROOT, 'playgrounds', '**', 'package.json'); -sh.exec(`npm version ${version} -ws --workspaces-update=false`); +sh.exec(`npm version ${version} -ws --include-workspace-root --workspaces-update=false`); const setStrictVersion = /.*-(build|alpha|beta).*/.test(version); From 1c2647da0766e7dcaf32e97b1c901ddb0b0b327d Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Thu, 19 Oct 2023 14:06:15 +0400 Subject: [PATCH 03/18] Copy artifacts for DXBuild --- build/pack-all.ts | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/build/pack-all.ts b/build/pack-all.ts index 92869146e61e..d105931afdea 100644 --- a/build/pack-all.ts +++ b/build/pack-all.ts @@ -4,15 +4,21 @@ import path from "node:path"; const MONOREPO_ROOT = path.join(__dirname, '..'); const INTERNAL_TOOLS_ARTIFACTS = path.join(MONOREPO_ROOT, 'artifacts', 'internal-tools'); -const OUTPUT_DIR = path.join(MONOREPO_ROOT, 'npm'); +const OUTPUT_DIR = path.join(MONOREPO_ROOT, 'artifacts'); +const NPM_OUTPUT_DIR = path.join(OUTPUT_DIR, 'npm'); + sh.mkdir('-p', OUTPUT_DIR); +const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); +const MAJOR_VERSION = devextremeVersion.split('.').slice(0, 2).join('_'); + sh.cd(MONOREPO_ROOT); sh.exec('npm run tools:discover-declarations'); +sh.exec(`npm run tools -- make-aspnet-metadata --version ${MAJOR_VERSION}`); // Descriptions const DOCUMENTATION_DIR = path.join(OUTPUT_DIR, 'documentation'); -sh.exec(`git clone -b 23_2 --depth 1 --config core.longpaths=true https://github.com/DevExpress/devextreme-documentation.git ${DOCUMENTATION_DIR}`); +sh.exec(`git clone -b ${MAJOR_VERSION} --depth 1 --config core.longpaths=true https://github.com/DevExpress/devextreme-documentation.git ${DOCUMENTATION_DIR}`); sh.pushd(DOCUMENTATION_DIR); sh.exec('npm i'); @@ -23,8 +29,13 @@ sh.exec('npm run devextreme:inject-descriptions'); sh.exec('npm run build-dist -w devextreme-main'); -// bump version if needed -const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); +sh.pushd(path.join(MONOREPO_ROOT, 'packages/devextreme/artifacts')); +sh.cp('-r', 'ts', OUTPUT_DIR); +sh.cp('-r', 'js', OUTPUT_DIR); +sh.cp('-r', 'css', OUTPUT_DIR); +// TODO: copy bootstrap from node_modules +sh.popd(); + if (devextremeVersion !== devextremeNpmVersion) { sh.exec(`npm run all:bump -- ${devextremeNpmVersion}`); } @@ -33,21 +44,21 @@ const DEVEXTREME_NPM_DIR = path.join(MONOREPO_ROOT, 'packages/devextreme/artifac sh.pushd(path.join(DEVEXTREME_NPM_DIR, 'devextreme')) sh.exec('npm pack'); -sh.cp('*.tgz', OUTPUT_DIR); +sh.cp('*.tgz', NPM_OUTPUT_DIR); sh.popd(); sh.pushd(path.join(DEVEXTREME_NPM_DIR, 'devextreme-dist')) sh.exec('npm pack'); -sh.cp('*.tgz', OUTPUT_DIR); +sh.cp('*.tgz', NPM_OUTPUT_DIR); sh.popd(); sh.pushd(path.join(MONOREPO_ROOT, 'packages', 'devextreme-themebuilder')) sh.exec('npm run build && npm run pack'); -sh.cp('dist/*.tgz', OUTPUT_DIR); +sh.cp('dist/*.tgz', NPM_OUTPUT_DIR); sh.popd(); sh.exec('npm run pack --ws --if-present'); -sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-angular', 'npm', 'dist', '*.tgz'), OUTPUT_DIR); -sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-react', 'npm', '*.tgz'), OUTPUT_DIR); -sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-vue', 'npm', '*.tgz'), OUTPUT_DIR); +sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-angular', 'npm', 'dist', '*.tgz'), NPM_OUTPUT_DIR); +sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-react', 'npm', '*.tgz'), NPM_OUTPUT_DIR); +sh.cp(path.join(MONOREPO_ROOT, 'packages', 'devextreme-vue', 'npm', '*.tgz'), NPM_OUTPUT_DIR); From b12d0ee29c68153bafe766807fa0211c1a566d4b Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Thu, 19 Oct 2023 16:56:37 +0400 Subject: [PATCH 04/18] Clean up, add comments, copy bootstrap --- build/pack-all.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/build/pack-all.ts b/build/pack-all.ts index d105931afdea..dcf2c621d9e0 100644 --- a/build/pack-all.ts +++ b/build/pack-all.ts @@ -7,35 +7,44 @@ const INTERNAL_TOOLS_ARTIFACTS = path.join(MONOREPO_ROOT, 'artifacts', 'internal const OUTPUT_DIR = path.join(MONOREPO_ROOT, 'artifacts'); const NPM_OUTPUT_DIR = path.join(OUTPUT_DIR, 'npm'); -sh.mkdir('-p', OUTPUT_DIR); +sh.mkdir('-p', OUTPUT_DIR, NPM_OUTPUT_DIR); const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); const MAJOR_VERSION = devextremeVersion.split('.').slice(0, 2).join('_'); +// Prepare metadata sh.cd(MONOREPO_ROOT); sh.exec('npm run tools:discover-declarations'); sh.exec(`npm run tools -- make-aspnet-metadata --version ${MAJOR_VERSION}`); -// Descriptions -const DOCUMENTATION_DIR = path.join(OUTPUT_DIR, 'documentation'); -sh.exec(`git clone -b ${MAJOR_VERSION} --depth 1 --config core.longpaths=true https://github.com/DevExpress/devextreme-documentation.git ${DOCUMENTATION_DIR}`); +// Inject descriptions +const DOCUMENTATION_TEMP_DIR = path.join(OUTPUT_DIR, 'doc_tmp'); +sh.exec(`git clone -b ${MAJOR_VERSION} --depth 1 --config core.longpaths=true https://github.com/DevExpress/devextreme-documentation.git ${DOCUMENTATION_TEMP_DIR}`); -sh.pushd(DOCUMENTATION_DIR); +sh.pushd(DOCUMENTATION_TEMP_DIR); sh.exec('npm i'); sh.exec(`npm run update-topics -- --artifacts ${INTERNAL_TOOLS_ARTIFACTS}`); sh.popd(); +sh.rm('-rf', DOCUMENTATION_TEMP_DIR); + sh.exec('npm run devextreme:inject-descriptions'); sh.exec('npm run build-dist -w devextreme-main'); +// Copy artifacts for DXBuild (Installation) sh.pushd(path.join(MONOREPO_ROOT, 'packages/devextreme/artifacts')); sh.cp('-r', 'ts', OUTPUT_DIR); sh.cp('-r', 'js', OUTPUT_DIR); sh.cp('-r', 'css', OUTPUT_DIR); -// TODO: copy bootstrap from node_modules sh.popd(); +// TODO: maybe we should add bootstrap to vendors +const BOOTSTRAP_DIR = path.join(MONOREPO_ROOT, 'node_modules', 'bootstrap', 'dist'); +sh.cp([path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.js'), path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.min.js')], path.join(OUTPUT_DIR, 'js')); +sh.cp([path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.css'), path.join(BOOTSTRAP_DIR, 'js', 'bootstrap.min.css')], path.join(OUTPUT_DIR, 'css')); + +// Update versions for non-semver builds (daily, alpha and beta) if (devextremeVersion !== devextremeNpmVersion) { sh.exec(`npm run all:bump -- ${devextremeNpmVersion}`); } From a5a3f7aa61a2892aa3fc00e07c3b02b9463a4bce Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Thu, 19 Oct 2023 17:17:13 +0400 Subject: [PATCH 05/18] Fix naming, add "how to use", do not rewrite artifacts dir --- build/{pack-all.ts => build-all.ts} | 2 +- build/{bump-version.ts => update-version.ts} | 5 +++++ package.json | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) rename build/{pack-all.ts => build-all.ts} (98%) rename build/{bump-version.ts => update-version.ts} (83%) diff --git a/build/pack-all.ts b/build/build-all.ts similarity index 98% rename from build/pack-all.ts rename to build/build-all.ts index dcf2c621d9e0..a819c10b9942 100644 --- a/build/pack-all.ts +++ b/build/build-all.ts @@ -7,7 +7,7 @@ const INTERNAL_TOOLS_ARTIFACTS = path.join(MONOREPO_ROOT, 'artifacts', 'internal const OUTPUT_DIR = path.join(MONOREPO_ROOT, 'artifacts'); const NPM_OUTPUT_DIR = path.join(OUTPUT_DIR, 'npm'); -sh.mkdir('-p', OUTPUT_DIR, NPM_OUTPUT_DIR); +sh.mkdir('-p', NPM_OUTPUT_DIR); const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); const MAJOR_VERSION = devextremeVersion.split('.').slice(0, 2).join('_'); diff --git a/build/bump-version.ts b/build/update-version.ts similarity index 83% rename from build/bump-version.ts rename to build/update-version.ts index 1687215e34c6..0a158a81d155 100644 --- a/build/bump-version.ts +++ b/build/update-version.ts @@ -3,6 +3,11 @@ import path from "node:path"; const version = process.argv[2]; +if (version == null) { + console.error(`Usage: "npm run all:update-version -- $version" (XX.X.X)`); + process.exit(1); +} + const MONOREPO_ROOT = path.join(__dirname, '..'); const packagesPath = path.join(MONOREPO_ROOT, 'packages', '**', 'package.json'); const playgroundsPath = path.join(MONOREPO_ROOT, 'playgrounds', '**', 'package.json'); diff --git a/package.json b/package.json index 2fa215ec6e55..567307b9ab17 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "regenerate-all": "nx run-many -t regenerate", "lint-staged": "lint-staged", "prepare": "husky install", - "all:pack": "ts-node build/pack-all.ts", - "all:bump": "ts-node build/bump-version.ts" + "all:update-version": "ts-node build/update-version.ts", + "all:build": "ts-node build/build-all.ts" }, "nx": {}, "private": true, From febfa55f956b11d9fd0bdc1ca89d806d252beb51 Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Thu, 19 Oct 2023 17:23:37 +0400 Subject: [PATCH 06/18] Rename and fix workflow, add pull_request trigger for tests --- .../workflows/{bump_version.yml => update_version.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{bump_version.yml => update_version.yml} (84%) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/update_version.yml similarity index 84% rename from .github/workflows/bump_version.yml rename to .github/workflows/update_version.yml index a0c8d97c9098..5ee0597ca2be 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/update_version.yml @@ -1,13 +1,13 @@ -name: Bump version +name: Update version in all workspaces on: + pull_request: workflow_dispatch: inputs: branch_name: type: string description: XX_X (23_2+) required: true -#TODO: increment version on branch or set exact version from inputs?? version: type: string description: XX.X.X Set exact version (optional) @@ -31,13 +31,13 @@ jobs: run: npm install --no-audit --no-fund - name: Bump version - run: npm run all:bump -- ${{ inputs.version }} + run: npm run all:update-version -- ${{ inputs.version }} - name: Commit changes and make PR shell: bash env: GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} - branch_name: 'robot/bump-version-${{ inputs.branch_name }}' + branch_name: 'robot/update-version-${{ inputs.branch_name }}' run: | git checkout -b $branch_name git add . -N From 488446cac8b5013869ee55050ae4b98f55feec35 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Thu, 19 Oct 2023 18:24:27 +0400 Subject: [PATCH 07/18] Add defaults in inputs / Update job name --- .github/workflows/update_version.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 5ee0597ca2be..ebc98879dedc 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -1,19 +1,23 @@ name: Update version in all workspaces on: - pull_request: + pull_request: workflow_dispatch: inputs: branch_name: type: string description: XX_X (23_2+) required: true + default: 23_2 version: type: string description: XX.X.X Set exact version (optional) + required: true + default: 23.2.1 jobs: - build: + update_version: + name: Update version and create PR runs-on: devextreme-shr2 steps: From 602f9df387e2bfb2eb33a511151c45dd01790992 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Thu, 19 Oct 2023 18:38:37 +0400 Subject: [PATCH 08/18] Test "Update version" action --- .github/workflows/update_version.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index ebc98879dedc..d614c724008f 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -24,7 +24,7 @@ jobs: - name: Get sources uses: actions/checkout@v4 with: - ref: ${{ inputs.branch_name }} + ref: 23_2 - name: Use Node.js uses: actions/setup-node@v3 @@ -35,17 +35,17 @@ jobs: run: npm install --no-audit --no-fund - name: Bump version - run: npm run all:update-version -- ${{ inputs.version }} + run: npm run all:update-version -- 23.2.1 - name: Commit changes and make PR shell: bash env: GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} - branch_name: 'robot/update-version-${{ inputs.branch_name }}' + branch_name: 'robot/update-version-23_2_1' run: | git checkout -b $branch_name git add . -N git commit -a -m "Bump devextreme version" git push --set-upstream origin $branch_name --force - gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.branch_name }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops + gh pr create --base 23_2 --title "Bump devextreme version (23.2.1)" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops From 925a0b0a9c559b9dea7ffa9c75893e4ee0df1151 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Thu, 19 Oct 2023 18:44:53 +0400 Subject: [PATCH 09/18] Remove ref for checkout --- .github/workflows/update_version.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index d614c724008f..2334e841231e 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -23,8 +23,6 @@ jobs: steps: - name: Get sources uses: actions/checkout@v4 - with: - ref: 23_2 - name: Use Node.js uses: actions/setup-node@v3 From 3989bfdc3f09c08156162b6631d6fd129718d1ba Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Fri, 20 Oct 2023 11:14:25 +0400 Subject: [PATCH 10/18] Setup git config --- .github/workflows/update_version.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 2334e841231e..c912a6f38185 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -29,6 +29,11 @@ jobs: with: node-version: '18.16.1' + - name: Setup git config + run: | + git config --global user.email "DXGitHubRobot@devexpress.com" + git config --global user.name "DX Robot" + - name: Install packages in devextreme repo run: npm install --no-audit --no-fund @@ -36,7 +41,6 @@ jobs: run: npm run all:update-version -- 23.2.1 - name: Commit changes and make PR - shell: bash env: GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} branch_name: 'robot/update-version-23_2_1' From e83036a7cc86cd3558642ee6d2c8a8de75d1eabd Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Fri, 20 Oct 2023 11:18:39 +0400 Subject: [PATCH 11/18] Update runner --- .github/workflows/update_version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index c912a6f38185..d3d12d1841e4 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -18,7 +18,7 @@ on: jobs: update_version: name: Update version and create PR - runs-on: devextreme-shr2 + runs-on: ubuntu-latest steps: - name: Get sources From 6137fa6e8683ab724732d7b081bf43789d63f3ea Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Fri, 20 Oct 2023 13:12:31 +0400 Subject: [PATCH 12/18] Revert testing changes --- .github/workflows/update_version.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index d3d12d1841e4..61d19dc77f45 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -1,7 +1,6 @@ name: Update version in all workspaces on: - pull_request: workflow_dispatch: inputs: branch_name: @@ -23,6 +22,8 @@ jobs: steps: - name: Get sources uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch_name }} - name: Use Node.js uses: actions/setup-node@v3 @@ -38,16 +39,16 @@ jobs: run: npm install --no-audit --no-fund - name: Bump version - run: npm run all:update-version -- 23.2.1 + run: npm run all:update-version -- ${{ inputs.version }} - name: Commit changes and make PR env: GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} - branch_name: 'robot/update-version-23_2_1' + branch_name: 'robot/update-version-${{ inputs.branch_name }}' run: | git checkout -b $branch_name git add . -N git commit -a -m "Bump devextreme version" git push --set-upstream origin $branch_name --force - gh pr create --base 23_2 --title "Bump devextreme version (23.2.1)" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops + gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.branch_name }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops From 977c5b97f60dc6d07e0581b32896c35bf3481324 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Fri, 20 Oct 2023 13:29:22 +0400 Subject: [PATCH 13/18] Skip committing root package.json changes --- build/update-version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/update-version.ts b/build/update-version.ts index 0a158a81d155..1fef7d9f8a4c 100644 --- a/build/update-version.ts +++ b/build/update-version.ts @@ -12,7 +12,7 @@ const MONOREPO_ROOT = path.join(__dirname, '..'); const packagesPath = path.join(MONOREPO_ROOT, 'packages', '**', 'package.json'); const playgroundsPath = path.join(MONOREPO_ROOT, 'playgrounds', '**', 'package.json'); -sh.exec(`npm version ${version} -ws --include-workspace-root --workspaces-update=false`); +sh.exec(`npm version ${version} -ws --include-workspace-root --git-tag-version=false --workspaces-update=false`); const setStrictVersion = /.*-(build|alpha|beta).*/.test(version); From 52ff15a9b1c7f6d8ec14928f5c12ba5ad6244f12 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Fri, 20 Oct 2023 13:33:16 +0400 Subject: [PATCH 14/18] Update branch name for PR / Update PR title --- .github/workflows/update_version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 61d19dc77f45..03f6f5cf6706 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -44,11 +44,11 @@ jobs: - name: Commit changes and make PR env: GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} - branch_name: 'robot/update-version-${{ inputs.branch_name }}' + branch_name: 'robot/update-version-${{ inputs.version }}' run: | git checkout -b $branch_name git add . -N git commit -a -m "Bump devextreme version" git push --set-upstream origin $branch_name --force - gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.branch_name }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops + gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.version }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops From 2bd3c3494d165e7c3468923a15f382bd57bc70f3 Mon Sep 17 00:00:00 2001 From: Lykoi18 Date: Tue, 24 Oct 2023 14:53:55 +0400 Subject: [PATCH 15/18] Resolve conversations --- .github/workflows/update_version.yml | 6 ++---- build/build-all.ts | 8 ++++---- build/update-version.ts | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 03f6f5cf6706..5c26c6f59845 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -5,14 +5,12 @@ on: inputs: branch_name: type: string - description: XX_X (23_2+) + description: XX_X Branch name (23_2+) required: true - default: 23_2 version: type: string - description: XX.X.X Set exact version (optional) + description: XX.X.X Set exact version required: true - default: 23.2.1 jobs: update_version: diff --git a/build/build-all.ts b/build/build-all.ts index a819c10b9942..7a8030f9f7e7 100644 --- a/build/build-all.ts +++ b/build/build-all.ts @@ -1,5 +1,5 @@ -import sh from "shelljs"; -import path from "node:path"; +import sh from 'shelljs'; +import path from 'node:path'; const MONOREPO_ROOT = path.join(__dirname, '..'); const INTERNAL_TOOLS_ARTIFACTS = path.join(MONOREPO_ROOT, 'artifacts', 'internal-tools'); @@ -9,7 +9,7 @@ const NPM_OUTPUT_DIR = path.join(OUTPUT_DIR, 'npm'); sh.mkdir('-p', NPM_OUTPUT_DIR); -const { "devextreme-main": devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); +const { 'devextreme-main': devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout); const MAJOR_VERSION = devextremeVersion.split('.').slice(0, 2).join('_'); // Prepare metadata @@ -46,7 +46,7 @@ sh.cp([path.join(BOOTSTRAP_DIR, 'css', 'bootstrap.css'), path.join(BOOTSTRAP_DIR // Update versions for non-semver builds (daily, alpha and beta) if (devextremeVersion !== devextremeNpmVersion) { - sh.exec(`npm run all:bump -- ${devextremeNpmVersion}`); + sh.exec(`npm run all:update-version -- ${devextremeNpmVersion}`); } const DEVEXTREME_NPM_DIR = path.join(MONOREPO_ROOT, 'packages/devextreme/artifacts/npm'); diff --git a/build/update-version.ts b/build/update-version.ts index 1fef7d9f8a4c..6b3d1ebd779c 100644 --- a/build/update-version.ts +++ b/build/update-version.ts @@ -1,10 +1,10 @@ -import sh from "shelljs"; -import path from "node:path"; +import sh from 'shelljs'; +import path from 'node:path'; const version = process.argv[2]; if (version == null) { - console.error(`Usage: "npm run all:update-version -- $version" (XX.X.X)`); + console.error(`Usage: 'npm run all:update-version -- $version' (XX.X.X)`); process.exit(1); } From d0766092a4d65f23ad48a5fcb08ee6469436f763 Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Tue, 24 Oct 2023 16:29:03 +0400 Subject: [PATCH 16/18] Set actual version for devextreme-themebuilder and angular-playground --- packages/devextreme-themebuilder/package.json | 2 +- playgrounds/angular/package.json | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/devextreme-themebuilder/package.json b/packages/devextreme-themebuilder/package.json index afbbf80dde34..fcdb98f92426 100644 --- a/packages/devextreme-themebuilder/package.json +++ b/packages/devextreme-themebuilder/package.json @@ -1,6 +1,6 @@ { "name": "devextreme-themebuilder", - "version": "0.0.1", + "version": "23.2.0", "description": "DevExtreme ThemeBuilder", "keywords": [ "devextreme", diff --git a/playgrounds/angular/package.json b/playgrounds/angular/package.json index 83f366f75d94..5d8210bcfcad 100644 --- a/playgrounds/angular/package.json +++ b/playgrounds/angular/package.json @@ -1,12 +1,10 @@ { "name": "devextreme-angular-playground", - "version": "0.0.0", - "scripts": { - "ng": "ng", - "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider ng serve --open -c dev", - "build": "echo empty" - }, + "description": "DevExtreme Angular UI and Visualization Components", "private": true, + "version": "23.2.0", + "author": "Developer Express Inc.", + "license": "MIT", "dependencies": { "@angular/animations": "~12.2.17", "@angular/common": "~12.2.17", @@ -30,5 +28,10 @@ "@angular/language-service": "12.2.17", "@types/node": "8.10.66", "ts-node": "7.0.1" + }, + "scripts": { + "ng": "ng", + "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider ng serve --open -c dev", + "build": "echo empty" } } From e296f0580e3fb3202da9b348fa806f1ebf5db4c2 Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Tue, 24 Oct 2023 17:07:07 +0400 Subject: [PATCH 17/18] Remove condition for version replace in deps --- build/update-version.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build/update-version.ts b/build/update-version.ts index 6b3d1ebd779c..2338a6241e99 100644 --- a/build/update-version.ts +++ b/build/update-version.ts @@ -14,10 +14,6 @@ const playgroundsPath = path.join(MONOREPO_ROOT, 'playgrounds', '**', 'package.j sh.exec(`npm version ${version} -ws --include-workspace-root --git-tag-version=false --workspaces-update=false`); -const setStrictVersion = /.*-(build|alpha|beta).*/.test(version); - -if (setStrictVersion) { - sh.sed('-i', /"devextreme(-angular|-react|-vue)?": ".*"/, `"devextreme$1": "${version}"`, [packagesPath, playgroundsPath]); -} +sh.sed('-i', /"devextreme(-angular|-react|-vue)?": ".*"/, `"devextreme$1": "~${version}"`, [packagesPath, playgroundsPath]); sh.exec('npm i'); From 5ff9da2ce74bc37bfd9ce4abd33dd9cd89f64521 Mon Sep 17 00:00:00 2001 From: alexlavrov Date: Tue, 24 Oct 2023 17:21:21 +0400 Subject: [PATCH 18/18] Remove devextreme from dev deps in devextreme-angular, update lockfile --- package-lock.json | 6 +++--- packages/devextreme-angular/package.json | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39d623fec91d..17c054698172 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47276,7 +47276,6 @@ "codelyzer": "6.0.2", "core-js": "^2.6.12", "del": "^2.2.2", - "devextreme": "~23.2.0", "gulp": "^4.0.2", "gulp-header": "^1.8.12", "gulp-replace": "^0.6.1", @@ -49188,7 +49187,7 @@ } }, "packages/devextreme-themebuilder": { - "version": "0.0.1", + "version": "23.2.0", "license": "SEE LICENSE IN README.md", "dependencies": { "autoprefixer": "^10.4.7", @@ -50268,7 +50267,8 @@ }, "playgrounds/angular": { "name": "devextreme-angular-playground", - "version": "0.0.0", + "version": "23.2.0", + "license": "MIT", "dependencies": { "@angular/animations": "~12.2.17", "@angular/common": "~12.2.17", diff --git a/packages/devextreme-angular/package.json b/packages/devextreme-angular/package.json index f029517c2f50..55976a8be719 100644 --- a/packages/devextreme-angular/package.json +++ b/packages/devextreme-angular/package.json @@ -38,7 +38,6 @@ "codelyzer": "6.0.2", "core-js": "^2.6.12", "del": "^2.2.2", - "devextreme": "~23.2.0", "gulp": "^4.0.2", "gulp-header": "^1.8.12", "gulp-replace": "^0.6.1",