-
-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we don't keep the bumped version of the package in the master branch, but use
npm --no-git-tag-version version patch
instead
@@ -0,0 +1,32 @@ | |||
#!/usr/bin/env node | |||
|
|||
var fsModule = require('fs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { readFileSync, writeFileSync } from "fs";
// Adds a publishConfig section to the package.json file | ||
// and sets a tag to it | ||
|
||
var path = './package.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const and double quotes in this file
.travis.yml
Outdated
branch: vchimev-travis | ||
skip_cleanup: true | ||
api_key: | ||
secure: HYqLXOd6FqNrOO0KTseros1LTkQ+OdZIzL1lncg+3RAcb/pxViVSUHbXZ9ml3ubVFU/ZN6n4l2snmjzCCYlkQ3CeeI6qqLMsXN2ywUFFdDJyFkz7VD0jyxoilS7HXY2TqFWtF58OeBFG5woY2OdfL2dzxrM2hsbs8ODvuUhoA1g0Y4DgH9W/RQK/8Ml+jII16/bzpKNCCI45zxRzzTW80QyxFR1Q2ABXVUQDBQa0LJ38eo8WDl8Jh1RdUTFJwicQG14WZTC69b1Sr4BHpm5nFExp7XX8gbmu6fcMyItGvbIhTqDA02CmjL7MYm5349SiJh+y9wLkxbBIH8rmY3pL3NIL9pBkPoYbWU/ZoG5e1iqc+2RoZjw7VW969IokeFiQV4QiNLEbFC9PnlXQJDmeKQXSh+aRKST6CKxDZxisp4gmt7h+4Rp7gU8BTVGbN0by15S7ab+CL8ZGa8gUqtGHwEjmFEpE0fQvcaZYVQHWO4kw4cwmwqXiyvnF2o5LYjjY4gjGnOOiKS2qZmABjftdUvKc5N0vZ2Vyq1O657EP8RFUAcvIJlZ1dBKDYq/vGr0hQ4iReJXyTYdCWHSNgzq4boAsdes3kHK8I9VBMrlUWmA9Ba/lMAaBgW5qOEQhdtWYKjHwmFadWwHfQocGLqp5TBTqWZF1sCC0OFybsME7SdU= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be 'secure' and not in source control?
|
||
var path = './package.json'; | ||
var fileOptions = {encoding: "utf-8"}; | ||
var content = fsModule.readFileSync(path, fileOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use the "getPackageJson" method from "../projectHelpers"
} | ||
|
||
var packageDef = JSON.parse(content); | ||
if (!packageDef.publishConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packageDef.publishConfig = Object.assign(
packageDef.publishConfig || {},
{ tag });
instead of 19-22
} | ||
packageDef.publishConfig.tag = tag; | ||
|
||
if (packageDef.private) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed,
delete packageDef.private
the above will return true always even if 'private' doesn't exist
var package_version = process.argv[3]; | ||
packageDef.version += '-' + package_version; | ||
|
||
var newContent = JSON.stringify(packageDef, null, ' '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use "writePackageJson" from the projectHelpers
delete packageDef.private; | ||
} | ||
|
||
var package_version = process.argv[3]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can extract the process args in the beginning of the file
e1ba920
to
2e451b2
Compare
- add .travis.yml config - add prepublish-next script
Uh oh!
There was an error while loading. Please reload this page.