Skip to content

Commit

Permalink
Merge pull request #8 from ptc-iot-sharing/2.8.3
Browse files Browse the repository at this point in the history
2.8.3
  • Loading branch information
BogdanMihaiciuc authored Jan 30, 2022
2 parents 01f1d72 + 4af90df commit 2372632
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 2.8.3

This release includes bug fixes and minor improvements.

More detailed information about the contents of this release is available on the matching releases pages for:

- [BMCoreUI](https://github.com/BogdanMihaiciuc/BMCoreUI/releases/tag/2.8.3)
- [BMView](https://github.com/BogdanMihaiciuc/BMView/releases/tag/2.8.3)
- [BMCodeHost](https://github.com/BogdanMihaiciuc/BMCodeHost/releases/tag/2.8.3)
- [BMPresentationController](https://github.com/BogdanMihaiciuc/BMPresentationController/releases/tag/2.8.3)

# 2.8.2

This release contains bug fixes and support for [monaco script editor v 1.23](https://github.com/ptc-iot-sharing/MonacoEditorTWX/releases/tag/v1.23.0).
Expand Down
26 changes: 22 additions & 4 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { spawn } = require('child_process');
const request = require('request');

const packageJson = require('./package.json');
const zipName = `${packageJson.packageName}-min-${packageJson.version}.zip`;
let zipName = `${packageJson.packageName}-min-${packageJson.version}.zip`;

const subProjects = {
'BMCoreUI': '../BMCoreUI',
Expand All @@ -28,6 +28,11 @@ const subProjects = {
'BMView': '../BMView'
}

function zipNameDebug(cb) {
zipName = `${packageJson.packageName}-dev-${packageJson.version}.zip`;
cb();
}

/**
* Cleans the build directory.
*/
Expand All @@ -45,12 +50,23 @@ async function cleanBuildDir() {
* Builds all subprojects.
*/
async function buildAll() {
await buildAllWithCommand('build');
}

/**
* Builds all subprojects without optimization.
*/
async function buildAllDebug() {
await buildAllWithCommand('buildDebug');
}

async function buildAllWithCommand(command) {
// Build core ui first, if specified
for (const key in subProjects) {
if (key == 'BMCoreUI') {
console.log(`Building sub-project ${key}...`);
await new Promise(resolve => {
spawn('npm', ['run', 'build'], {cwd: subProjects[key], stdio: 'inherit', shell: true}).on('close', resolve);
spawn('npm', ['run', command], {cwd: subProjects[key], stdio: 'inherit', shell: true}).on('close', resolve);
});
break;
}
Expand All @@ -63,7 +79,7 @@ async function buildAll() {

console.log(`Building sub-project ${key}...`);
promises.push(new Promise(resolve => {
spawn('npm', ['run', 'build'], {cwd: subProjects[key], stdio: 'inherit', shell: true}).on('close', resolve);
spawn('npm', ['run', command], {cwd: subProjects[key], stdio: 'inherit', shell: true}).on('close', resolve);
}));
}

Expand Down Expand Up @@ -227,6 +243,8 @@ async function upload() {
}

exports.default = series(cleanBuildDir, buildAll, copyAll, mergeAll, createZip);
exports.buildDebug = series(zipNameDebug, cleanBuildDir, buildAllDebug, copyAll, mergeAll, createZip);
exports.merge = series(cleanBuildDir, copyAll, mergeAll, createZip);

exports.upload = series(cleanBuildDir, buildAll, copyAll, mergeAll, createZip, upload);
exports.upload = series(cleanBuildDir, buildAll, copyAll, mergeAll, createZip, upload);
exports.uploadDebug = series(zipNameDebug, cleanBuildDir, buildAllDebug, copyAll, mergeAll, createZip, upload);
2 changes: 1 addition & 1 deletion metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><Entities>
<ExtensionPackages>
<ExtensionPackage name="BMCoreUIWidgets" packageVersion="2.8.2" description="Contains Core UI and all its dependent widgets." vendor="Bogdan Mihaiciuc" minimumThingWorxVersion="6.0.0" buildNumber="{&quot;giteaURL&quot;: &quot;https://api.github.com/repos/ptc-iot-sharing/BMCoreUIWidgets/releases/latest&quot;}"/>
<ExtensionPackage name="BMCoreUIWidgets" packageVersion="2.8.3" description="Contains Core UI and all its dependent widgets." vendor="Bogdan Mihaiciuc" minimumThingWorxVersion="6.0.0" buildNumber="{&quot;giteaURL&quot;: &quot;https://api.github.com/repos/ptc-iot-sharing/BMCoreUIWidgets/releases/latest&quot;}"/>
</ExtensionPackages>
<Widgets>
<Widget name="BMCoreUIWidgets">
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "BMCoreUIWidgets",
"packageName": "BMCoreUIWidgets",
"moduleName": "BMCoreUIWidgets",
"version": "2.8.2",
"version": "2.8.3",
"description": "A collection of reusable UI classes.",
"thingworxServer": "http://localhost:8015",
"thingworxUser": "Administrator",
Expand All @@ -20,9 +20,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "gulp",
"buildProduction": "gulp --p",
"buildDebug": "gulp buildDebug",
"upload": "gulp upload",
"uploadProduction": "gulp upload --p"
"uploadDebug": "gulp uploadDebug"
},
"license": "MIT",
"devDependencies": {
Expand Down

0 comments on commit 2372632

Please sign in to comment.