Skip to content

Commit

Permalink
Merge pull request #157 from xtremespb/core_110821
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
xtremespb committed Aug 12, 2021
2 parents e0ccde7 + 28dfb16 commit 7343fa7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/npmi.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class NPMI {
let exitCode;
const workerProcess = exec(cmd, (error, stdout, stderr) => {
if (exitCode === 0) {
// eslint-disable-next-line no-control-regex
fs.ensureDirSync(path.resolve(`${__dirname}/../logs`));
// eslint-disable-next-line no-control-regex
fs.writeFileSync(path.resolve(`${__dirname}/../logs/build_${format(new Date(), "yyyyMMdd_HHmmss")}.log`), stdout.replace(/[^\x00-\x7F]/g, ""));
resolve(stdout);
} else {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zoia3",
"version": "3.1.96",
"version": "3.1.97",
"description": "ZOIA Content Management System",
"scripts": {
"config": "node ./dev/bin/config.js",
Expand Down
3 changes: 3 additions & 0 deletions src/modules/core/api/apiUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default () => ({
const tempFile = `${uuid()}.zip`;
const workingDir = path.resolve(`${__dirname}/../..`);
const updateDir = path.resolve(`${__dirname}/../../update`);
const devDir = path.resolve(`${__dirname}/../../dev`);
const srcDir = path.resolve(`${__dirname}/../../src/`);
const currentServerScript = path.resolve(`${__dirname}/../../build/bin/zoia.js`);
const currentTestScript = path.resolve(`${__dirname}/../../build/bin/test.js`);
Expand Down Expand Up @@ -106,6 +107,8 @@ export default () => ({
// Get update contents
const tempDirContents = await fs.readdir(tempDir);
await updateStatus(req, this.mongo.db, C.UPDATE_STATUS_COPY_SRC_DIR);
// Copy "dev" directory
await fs.copy(path.resolve(tempDir, tempDirContents[0], "dev"), devDir);
// Copy "src" directory to the update directory
await fs.copy(path.resolve(tempDir, tempDirContents[0], "src"), updateDir);
// Create backup of the "package.json" file
Expand Down

0 comments on commit 7343fa7

Please sign in to comment.