backup/restore package.json rather than using git checkout
This commit is contained in:
parent
56d6cfde2c
commit
dcdf6f68b0
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ NAME=$(node -e 'console.log(require("./package.json").name)')
|
|||
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
||||
|
||||
# remove devDependencies and scripts.prepare
|
||||
ORIG_PKG="$(cat package.json)"
|
||||
node -e '
|
||||
const fs = require("fs");
|
||||
const pkg = JSON.parse(fs.readFileSync("package.json"));
|
||||
|
@ -38,5 +39,5 @@ git push origin v${VERSION}
|
|||
# return to original state
|
||||
git reset ${ORIG_BRANCH}
|
||||
git checkout ${ORIG_BRANCH}
|
||||
git checkout package.json
|
||||
echo "${ORIG_PKG}" > package.json
|
||||
git branch -D ${TEMP_BRANCH}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue