From 0db38a05bb75ef2acf43619752bdd02c286b973c Mon Sep 17 00:00:00 2001 From: Robert Lukasonok <70327485+roluk@users.noreply.github.com> Date: Mon, 4 Apr 2022 16:33:29 +0300 Subject: [PATCH] Apply fixups for v0.1.0 release (#80) --- presentation-rules-editor-react/package.json | 1 - scripts/src/finalizeRelease.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/presentation-rules-editor-react/package.json b/presentation-rules-editor-react/package.json index 1f66e6b..33e579a 100644 --- a/presentation-rules-editor-react/package.json +++ b/presentation-rules-editor-react/package.json @@ -16,7 +16,6 @@ "release": "ts-node --transpile-only ../scripts/src/finalizeRelease.ts" }, "license": "MIT", - "private": true, "author": { "name": "Bentley Systems, Inc.", "url": "https://www.bentley.com" diff --git a/scripts/src/finalizeRelease.ts b/scripts/src/finalizeRelease.ts index 0bffe5a..8c228cd 100644 --- a/scripts/src/finalizeRelease.ts +++ b/scripts/src/finalizeRelease.ts @@ -2,7 +2,7 @@ * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ -import { execSync } from "child_process"; +import { execFileSync } from "child_process"; import * as fs from "fs"; import * as path from "path"; @@ -57,8 +57,8 @@ const updatedChangelogContent = changelogContent fs.writeFileSync(changelogFilePath, updatedChangelogContent); try { - execSync(`git add ${packageJsonFilePath} ${changelogFilePath}`); - execSync(`git commit -e -m \"Release ${packageName}@${packageVersion}\"`); + execFileSync("git", ["add", packageJsonFilePath, changelogFilePath]); + execFileSync("git", ["commit", "-e", "-m", `Release ${packageName}@${packageVersion}`]); } catch (error) { console.error(error instanceof Error ? `${error.name}: ${error.message}` : "Could not commit file changes."); process.exit(1);