Skip to content

Commit

Permalink
Bring back stage and PDF links per Chet's request for PNs
Browse files Browse the repository at this point in the history
Also rename the project JSON file in order to run npm on it without any extra flags.

Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Apr 16, 2022
1 parent a170971 commit 94792eb
Show file tree
Hide file tree
Showing 11 changed files with 10,899 additions and 44 deletions.
5 changes: 3 additions & 2 deletions README-respec.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ can follow this process:

1. Make sure you are up to date and on the 'feature/oasis-style' branch (git up; git checkout feature/oasis-style)
2. Go to 'tools'
3. Bump the version in `package-oasis.json`.
1. Run `npm i` to install all dependencies.
3. Bump the version in `package.json`.
4. Run the build script (node build-oasis-common.js). This should respond "OK!" (if not, fix the
issue).
5. Add the new build (git add builds/respec-oasis-common-m.n.r.js).
Expand All @@ -64,7 +65,7 @@ can follow this process:
9. Push everything back to the server (make sure you are pushing at least the `feature/oasis-style` and
`gh-pages` branches).

The simplest way of doing this, is to just run `tools/release.js`. This will prompt you a few times
The simplest way of doing this (except for the `npm i` step), is to just run `tools/release.js`. This will prompt you a few times
with the above process.

This hasn't been adopted by OASIS, this work is in progress.
9,607 changes: 9,607 additions & 0 deletions builds/respec-oasis-common-2.1.31.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions builds/respec-oasis-common.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ define(
conf.isAE = (conf.specStatus === "Errata");

conf.showThisVersion = !conf.isNoTrack;
conf.showPDF = !conf.isNoTrack && !conf.isWD;
conf.showPreviousVersion = (!conf.isNoTrack);
conf.showPDF = !conf.isWD;
conf.showPreviousVersion = true;
conf.notYetStd = (conf.isStdTrack && conf.specStatus !== "OS");
conf.isStd = (conf.isStdTrack && conf.specStatus === "OS");
conf.notStd = (conf.specStatus !== "OS");
Expand Down
47 changes: 22 additions & 25 deletions js/templates/headers.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,22 @@ <h2>
{{/if}}
</dd>
{{/unless}}
{{#unless isNoTrack}}
{{#if showPreviousVersion}}
<br/><dt class='loc-heading'>Previous stage:</dt>
<dd>
{{#if prevVersion}}
<a {{#if doRDFa}}rel="dcterms:replaces"{{/if}} href='{{prevVersion}}'>{{prevVersion}}</a> (Authoritative)
<br/>
<a {{#if doRDFa}}rel="dcterms:replaces"{{/if}} href='{{prevPDFVersion}}'>{{prevPDFVersion}}</a>
{{#if previousDocStatus}}
<br/>(published as {{previousDocStatus}}{{#if previousPublishHumanDate}} on {{previousPublishHumanDate}}{{/if}})
{{/if}}
{{else}}
N/A
{{/if}}
</dd>
{{/if}}
{{#if latestVersion}}
{{#if showPreviousVersion}}
<br/><dt class='loc-heading'>Previous stage:</dt>
<dd>
{{#if prevVersion}}
<a {{#if doRDFa}}rel="dcterms:replaces"{{/if}} href='{{prevVersion}}'>{{prevVersion}}</a> (Authoritative)
<br/>
<a {{#if doRDFa}}rel="dcterms:replaces"{{/if}} href='{{prevPDFVersion}}'>{{prevPDFVersion}}</a>
{{#if previousDocStatus}}
<br/>(published as {{previousDocStatus}}{{#if previousPublishHumanDate}} on {{previousPublishHumanDate}}{{/if}})
{{/if}}
{{else}}
N/A
{{/if}}
</dd>
{{/if}}
{{#if latestVersion}}
<br/>
<dt class='loc-heading'>Latest stage:</dt>
<dd>
Expand All @@ -53,14 +52,12 @@ <h2>
<a href='{{latestPDFVersion}}'>{{latestPDFVersion}}</a>
{{/if}}
</dd>

{{/if}}
{{#if latestSpecVersion}}
<br/>
<dt class='loc-heading'>Latest version:</dt>
<dd><a href='{{latestSpecVersion}}'>{{latestSpecVersion}}</a></dd>
{{/if}}
{{/unless}}
{{/if}}
{{#if latestSpecVersion}}
<br/>
<dt class='loc-heading'>Latest version:</dt>
<dd><a href='{{latestSpecVersion}}'>{{latestSpecVersion}}</a></dd>
{{/if}}
{{#if edDraftURI}}
<br/><dt class='loc-heading'>Latest editor's draft:</dt>
<dd><a href='{{edDraftURI}}'>{{edDraftURI}}</a></dd>
Expand Down
2 changes: 1 addition & 1 deletion tools/build-oasis-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var fs = require("fs")
, pth = require("path")
, b = require("./builder")
, version = JSON.parse(fs.readFileSync(pth.join(__dirname, "./package-oasis.json"), "utf-8")).version
, version = JSON.parse(fs.readFileSync(pth.join(__dirname, "./package.json"), "utf-8")).version
, builds = pth.join(__dirname, "../builds")
, latest = pth.join(builds, "respec-oasis-common.js")
;
Expand Down
2 changes: 1 addition & 1 deletion tools/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var fs = require("fs")
, pth = require("path")
, r = require("requirejs")
, version = JSON.parse(fs.readFileSync(pth.join(__dirname, "./package-oasis.json"), "utf-8")).version
, version = JSON.parse(fs.readFileSync(pth.join(__dirname, "./package.json"), "utf-8")).version
// , builds = pth.join(__dirname, "../builds")
// , versioned = pth.join(builds, "respec-oasis-common-" + version + ".js")
;
Expand Down
Loading

0 comments on commit 94792eb

Please sign in to comment.