Skip to content

Commit 94e0de2

Browse files
authored
Merge pull request #120 from waymondrang/release-link
patch: direct github link in notification to specific release tag
2 parents a29016e + a3d3016 commit 94e0de2

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,13 @@ npm run build
9292

9393
This creates optimized bundles in `build/` and packages the extension as a `.zip` file in `release/`. The packaging process is handled by `package.ts` and reads the version from `src/manifest.json`.
9494

95-
**Note on versioning**
95+
The version in `package.json` is copied to the extension's `manifest.json` when the extension is built.
9696

97-
The version number in `package.json` is copied to the extension's `manifest.json` when the extension is built.
97+
## Versions and tag names
98+
99+
The **version** must follow the structure: `<MAJOR VER>.<MINOR VER>.<PATCH VER>`.
100+
101+
The **tag name** for a release must follow the structure: `v<VERSION>`.
98102

99103
## Contributing
100104

src/docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ class DocsAfterDark {
519519
messageElement.appendChild(textElement);
520520

521521
const linkElement = document.createElement("a");
522-
linkElement.href = links.update;
522+
linkElement.href = links.release(CURRENT_VERSION); // Link to specific release via tag
523523
linkElement.target = "_blank";
524524
linkElement.textContent = "GitHub";
525525

src/values.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ const SELECTOR_PREFIX = "DocsAfterDark_";
1313
const links = {
1414
github: "https://github.com/waymondrang/docsafterdark",
1515
donate: "https://www.buymeacoffee.com/waymondrang",
16-
update: "https://github.com/waymondrang/docsafterdark/releases",
16+
releases: "https://github.com/waymondrang/docsafterdark/releases",
17+
release: (version: string) => {
18+
return `https://github.com/waymondrang/docsafterdark/releases/tag/v${version}`;
19+
},
1720
guide: "https://docsafterdark.com/guide",
1821
};
1922

0 commit comments

Comments
 (0)