Introduce Release script (#4631)

This commit is contained in:
Lucas Duailibe authored and GitHub committed 2018-06-05 16:37:52 -03:00
1 parent f27f6c525b
commit 54b1f8562d
20 files changed
+1009 -31

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
"use strict";
const { exec, spawn } = require("child-process-promise");
const { logPromise } = require("../utils");
async function format() {
await exec("yarn lint --fix");
await exec("yarn lint-docs --fix");
}
async function commit(version) {
await spawn("git", [
"commit",
"-am",
`Bump Prettier dependency to ${version}`
]);
await exec("git push");
}
module.exports = async function({ dry, version }) {
if (dry) {
return;
}
await logPromise(
"Installing Prettier",
spawn("yarn", ["add", "--dev", `prettier@${version}`])
);
await logPromise("Updating files", format());
await logPromise("Committing changed files", commit(version));
};