Skip to content

Commit

Permalink
Remove @next instructions from documentation
Browse files Browse the repository at this point in the history
Also adjust the script that sets release id in `_config.yml` to no longer make
any assumptions about pre-releases
  • Loading branch information
mroderick committed Mar 16, 2017
1 parent fc749fa commit 8bec6dd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion docs/_config.yml
Expand Up @@ -6,7 +6,6 @@ url: 'http://sinonjs.org'
github_username: sinonjs
sinon:
current_release: v2.0.0
next_release: v2.0.0-pre.6
markdown: kramdown
kramdown:
input: GFM
Expand Down
7 changes: 0 additions & 7 deletions docs/index.md
Expand Up @@ -4,7 +4,6 @@ title: Sinon.JS
---

{% assign current_release = site.sinon.current_release %}
{% assign next_release = site.sinon.next_release %}

# Sinon.JS

Expand All @@ -25,12 +24,6 @@ To install the current release (`{{current_release}}`) of Sinon:
npm install sinon
```

If you're interested in evaluating the next release of Sinon (`{{next_release}}`)

```shell
npm install sinon@next
```

If you (for some reason) really want the old version of Sinon, head over to the [legacy docs](http://legacy.sinonjs.org/) and do:

```shell
Expand Down
6 changes: 1 addition & 5 deletions scripts/set-release-id-in-config-yml.js
Expand Up @@ -5,12 +5,8 @@ var UTF8 = "utf8";
var fs = require("fs");
var yaml = require("js-yaml");
var releaseId = "v" + require("../package.json").version;

var isNextRelease = releaseId.includes("pre");
var releaseKey = isNextRelease ? "next_release" : "current_release";

var config = yaml.safeLoad(fs.readFileSync(configYmlPath, UTF8));

config.sinon[releaseKey] = releaseId;
config.sinon.current_release = releaseId; // eslint-disable-line camelcase

fs.writeFileSync(configYmlPath, yaml.safeDump(config), UTF8);

0 comments on commit 8bec6dd

Please sign in to comment.