Browse Source

v1.6.2

remotes/origin/add-simple-redirecting-site v1.6.2
Gal Schlezinger 6 years ago
parent
commit
5f8f19a8a9
  1. 62
      .ci/prepare-version.js
  2. 14
      CHANGELOG.md
  3. 2
      docs/fnm.svg
  4. 2
      library/Fnm__Package.re
  5. 5
      package.json

62
.ci/prepare-version.js

@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
#!/usr/bin/env node
const fs = require("fs");
const cp = require("child_process");
const ARGUMENTS = process.argv.slice(2);
const versions = {
patch: "patch",
minor: "minor",
major: "major"
};
if (!ARGUMENTS[0]) {
console.log(
[
"esy version:prepare, prepare a new fnm version",
"",
"Usage:",
"------",
"",
" esy version:prepare patch - to prepare a patch version (X.X.X+1)",
" esy version:prepare minor - to prepare a minor version (X.X+1.0)",
" esy version:prepare major - to prepare a major version (X+1.0.0)"
].join("\n")
);
process.exit(1);
}
const versionType = versions[ARGUMENTS[0].toLowerCase()];
if (!versionType) {
throw new Error("Version (argument 0) must be one of major/minor/patch.");
}
const pkgJson = JSON.parse(fs.readFileSync("./package.json", "utf8"));
pkgJson.version = changeVersion(versionType, pkgJson.version);
fs.writeFileSync("./package.json", JSON.stringify(pkgJson, null, 2));
exec("git fetch origin");
exec("esy update-fnm-package");
exec("esy verify-fnm-package");
exec("esy build");
exec("./docs/record_screen.sh");
exec(`esy changelog`, { NEXT_VERSION: `v${pkgJson.version}` });
function exec(command, env) {
console.log(`$ ${command}`);
return cp.execSync(command, {
stdio: "inherit",
env: { ...process.env, ...env }
});
}
function changeVersion(type, version) {
const [major, minor, patch] = version.split(".").map(x => parseFloat(x, 10));
switch (type) {
case "patch":
return [major, minor, patch + 1].join(".");
case "minor":
return [major, minor + 1, 0].join(".");
case "major":
return [major + 1, 0, 0].join(".");
}
}

14
CHANGELOG.md

@ -1,3 +1,17 @@ @@ -1,3 +1,17 @@
## v1.6.2 (2019-03-04)
#### Bugfix 🐛
- [#72](https://github.com/Schniz/fnm/pull/72) Fix alias paths ([@Schniz](https://github.com/Schniz))
#### Documentation 📝
- [#70](https://github.com/Schniz/fnm/pull/70) Fix installation script parameters docs ([@Schniz](https://github.com/Schniz))
#### Committers: 1
- Gal Schlezinger ([@Schniz](https://github.com/Schniz))
## v1.6.1 (2019-02-26)
#### Bugfix 🐛

2
docs/fnm.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 31 KiB

2
library/Fnm__Package.re

@ -1 +1 @@ @@ -1 +1 @@
let version = "1.6.1";
let version = "1.6.2";

5
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "fnm",
"version": "1.6.1",
"version": "1.6.2",
"description": "Fast and simple Node.js version manager, built in ReasonML",
"esy": {
"build": "pesy",
@ -71,7 +71,8 @@ @@ -71,7 +71,8 @@
"bootstrap": ".ci/bootstrap",
"test": "esy x TestFnm.exe",
"fmt": "bash -c 'refmt --in-place {library,executable,test}/*.re'",
"changelog": "bash -c 'esy lerna-changelog --from=v1.0.0 > CHANGELOG.md'"
"changelog": "bash -c 'esy lerna-changelog --from=v1.0.0 --next-version=${NEXT_VERSION-Unreleased} > CHANGELOG.md'",
"version:prepare": "node ./.ci/prepare-version.js"
},
"license": "GPL-3.0",
"dependencies": {

Loading…
Cancel
Save