Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Only increment root package
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Jul 2, 2019
1 parent eadc51f commit e1f7846
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "staart-manager",
"version": "1.0.49",
"version": "1.0.51",
"main": "index.js",
"repository": "[email protected]:AnandChowdhary/staart.git",
"author": "Anand Chowdhary <[email protected]>",
Expand Down
9 changes: 5 additions & 4 deletions setup/increment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ const incrementVersion = async () => {
path.join(__dirname, "..", "package.json"),
JSON.stringify(pkg, null, 2)
);
await fs.writeFile(
path.join(__dirname, "..", "src", "internal", "staart-version"),
newVersion
);
if (pkg.name === "staart-manager")
await fs.writeFile(
path.join(__dirname, "..", "src", "internal", "staart-version"),
newVersion
);
};

incrementVersion()
Expand Down
5 changes: 4 additions & 1 deletion setup/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const checkUpdate = async () => {
const i = JSON.parse(
(await fs.readFile(path.join(__dirname, "..", "package.json"))).toString()
);
if (i.name !== "staart-manager") {
if (
i.name !== "staart-manager" &&
!Object.keys(i.devDependencies).includes("staart-manager")
) {
if (process.env.USE_NPM) {
shell.exec("npm install --save-dev staart-manager");
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/internal/staart-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.49
1.0.51

0 comments on commit e1f7846

Please sign in to comment.