Skip to content

Commit

Permalink
Fix getting devextreme packages version in "all:build" script (#25890)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykoi18 authored Oct 26, 2023
1 parent 612755b commit 77d3012
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/build-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ 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 MAJOR_VERSION = devextremeVersion.split('.').slice(0, 2).join('_');
const monorepoVersion = sh.exec('npm pkg get version').stdout;
const MAJOR_VERSION = monorepoVersion.split('.').slice(0, 2).join('_');

// Prepare metadata
sh.cd(MONOREPO_ROOT);
Expand Down Expand Up @@ -44,6 +44,8 @@ const BOOTSTRAP_DIR = path.join(MONOREPO_ROOT, 'node_modules', 'bootstrap', 'dis
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'));

const { 'devextreme-main': devextremeVersion, devextreme: devextremeNpmVersion } = JSON.parse(sh.exec('npm pkg get version -ws --json').stdout);

// Update versions for non-semver builds (daily, alpha and beta)
if (devextremeVersion !== devextremeNpmVersion) {
sh.exec(`npm run all:update-version -- ${devextremeNpmVersion}`);
Expand Down

0 comments on commit 77d3012

Please sign in to comment.