Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ generated page already.

The site is versioned. `writerside.cfg` is generated for every language and
carries the version from `package.json`, so the header names the release it was
built from, and `buildprofiles.xml` points the switcher at `help-versions.json`
built from. That line ends with an `x-release-please-version` annotation and the
five files are listed as `extra-files` in `release-please-config.json`, because
`release-please` would otherwise bump the version and leave the configurations a
release behind — which fails `npm run docs:check` on `main` and takes the deploy
with it. `buildprofiles.xml` points the switcher at `help-versions.json`
at the site root. The deploy publishes each build twice — at the root as the
current version, and under `/<version>/` as an archive — keeping the zips in a
`docs-archive` branch, because Pages replaces everything it serves on every
Expand All @@ -211,8 +215,9 @@ after all five builds sit in one directory — that is when it can know which
pages exist in which language.

The languages, and every label around the prose, are declared in
`scripts/docs/languages.mjs`. Adding a language is a change to that file and a
new matrix entry in `.github/workflows/docs.yml`; the rest follows.
`scripts/docs/languages.mjs`. Adding a language is a change to that file, a new
matrix entry in `.github/workflows/docs.yml` and its `writerside.cfg` in the
`extra-files` of `release-please-config.json`; the rest follows.

## 7. Parity is not attributed

Expand Down
2 changes: 1 addition & 1 deletion docs/writerside-de/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="2.0.0"/>
<instance src="asu.tree" version="2.1.0"/> <!-- x-release-please-version -->
</ihp>
2 changes: 1 addition & 1 deletion docs/writerside-fr/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="2.0.0"/>
<instance src="asu.tree" version="2.1.0"/> <!-- x-release-please-version -->
</ihp>
2 changes: 1 addition & 1 deletion docs/writerside-ru/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="2.0.0"/>
<instance src="asu.tree" version="2.1.0"/> <!-- x-release-please-version -->
</ihp>
2 changes: 1 addition & 1 deletion docs/writerside-uk/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="2.0.0"/>
<instance src="asu.tree" version="2.1.0"/> <!-- x-release-please-version -->
</ihp>
2 changes: 1 addition & 1 deletion docs/writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="2.0.0"/>
<instance src="asu.tree" version="2.1.0"/> <!-- x-release-please-version -->
</ihp>
9 changes: 8 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
".": {
"release-type": "node",
"package-name": "apps-script-utils",
"changelog-path": "CHANGELOG.md"
"changelog-path": "CHANGELOG.md",
"extra-files": [
"docs/writerside/writerside.cfg",
"docs/writerside-ru/writerside.cfg",
"docs/writerside-uk/writerside.cfg",
"docs/writerside-de/writerside.cfg",
"docs/writerside-fr/writerside.cfg"
]
}
}
}
10 changes: 9 additions & 1 deletion scripts/docs/site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ function widget(language) {
const ARTWORK =
"https://darynamikhailenko.com/?utm_source=docs&amp;utm_medium=footer&amp;utm_campaign=apps-script-utils&amp;utm_content=banner-artist-credit";

/**
* The version on the instance line carries the `x-release-please-version`
* annotation, because `release-please` bumps `package.json` without knowing
* that five generated files repeat the version it writes. The annotation is
* what its generic updater looks for, so the release pull request rewrites
* these configurations along with the version, and the check that compares the
* generated files to the sources still passes once the release lands.
*/
export function writersideCfg(version) {
return `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
Expand All @@ -42,7 +50,7 @@ export function writersideCfg(version) {
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<snippets src="snippets"/>
<instance src="asu.tree" version="${version}"/>
<instance src="asu.tree" version="${version}"/> <!-- x-release-please-version -->
</ihp>
`;
}
Expand Down
Loading