diff --git a/dev-tools/get-version.sh b/dev-tools/get-version.sh deleted file mode 100755 index 555dd89e9e9c..000000000000 --- a/dev-tools/get-version.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Copyright OpenSearch Contributors -# SPDX-License-Identifier: Apache-2.0 - -set -e - -PACKAGE_VERSION=$(cat package.json \ -| grep version \ -| head -1 \ -| awk -F: '{ print $2 }' \ -| sed 's/[",]//g' \ -| tr -d [:space:]) - -echo "$PACKAGE_VERSION" \ No newline at end of file diff --git a/package.json b/package.json index 7112a5467048..5318be1daf3a 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept", "osd:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook", "spec_to_console": "node scripts/spec_to_console", - "pkg-version": "./dev-tools/get-version.sh" + "pkg-version": "node -e \"console.log(require('./package.json').version)\"" }, "repository": { "type": "git",