clean pkg json after publish

This commit is contained in:
ManishMadan2882
2024-09-04 00:20:42 +05:30
parent d4042ebaa2
commit d200db0eeb
3 changed files with 10 additions and 18 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "docsgpt",
"version": "0.4.1",
"version": "0.4.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "docsgpt",
"version": "0.4.1",
"version": "0.4.2",
"license": "Apache-2.0",
"dependencies": {
"@babel/plugin-transform-flow-strip-types": "^7.23.3",

View File

@@ -1,6 +1,6 @@
{
"name": "docsgpt",
"version": "0.4.1",
"name": "docsgpt-react",
"version": "0.4.2",
"private": false,
"description": "DocsGPT 🦖 is an innovative open-source tool designed to simplify the retrieval of information from project documentation using advanced GPT models 🤖.",
"source": "./src/index.html",
@@ -11,18 +11,6 @@
"dist",
"package.json"
],
"targets": {
"modern": {
"engines": {
"browsers": "Chrome 80"
}
},
"legacy": {
"engines": {
"browsers": "> 0.5%, last 2 versions, not dead"
}
}
},
"@parcel/resolver-default": {
"packageExports": true
},

View File

@@ -2,6 +2,7 @@
## chmod +x publish.sh - to upgrade ownership
set -e
cat package.json >> package_copy.json
cat package-lock.json >> package-lock_copy.json
publish_package() {
PACKAGE_NAME=$1
BUILD_COMMAND=$2
@@ -24,6 +25,9 @@ publish_package() {
# Publish to npm
npm publish
# Clean up
mv package_copy.json package.json
mv package-lock_copy.json package-lock.json
echo "Published ${PACKAGE_NAME}"
}
@@ -33,7 +37,7 @@ publish_package "docsgpt" "build"
# Publish docsgpt-react package
publish_package "docsgpt-react" "build:react"
# Clean up
mv package_copy.json package.json
rm -rf package_copy.json
rm -rf package-lock_copy.json
echo "---Process completed---"