Generated documentation :)

This commit is contained in:
Calum Bird
2021-11-09 21:24:31 -08:00
parent 5df34cd137
commit f55350bebc
11 changed files with 234 additions and 1 deletions

View File

@@ -11,6 +11,12 @@ const filename = "dist.tar.gz";
const url = `https://github.com/louislam/uptime-kuma/releases/download/${version}/${filename}`;
download(url);
/**
* Downloads the latest version of the dist from a GitHub release.
* @param {string} url The URL to download from.
*
* Generated by Trelent
*/
function download(url) {
console.log(url);

View File

@@ -37,6 +37,12 @@ if (! exists) {
console.log("version exists");
}
/**
* Updates the version number in package.json and commits it to git
* @param {string} version - The new version number
*
* Generated by Trelent
*/
function commit(version) {
let msg = "update to " + version;
@@ -54,6 +60,12 @@ function tag(version) {
console.log(res.stdout.toString().trim());
}
/**
* Checks if a given version is already tagged in the git repository.
* @param {string} version - The version to check for.
*
* Generated by Trelent
*/
function tagExists(version) {
if (! version) {
throw new Error("invalid version");
@@ -64,6 +76,13 @@ function tagExists(version) {
return res.stdout.toString().trim() === version;
}
/**
* Update the How-to-Update.md file in the wiki to reflect a new version of Kuma.
* @param {string} oldVersion The previous version of Kuma that was released.
* @param {string} newVersion The current version of Kuma that is being released.
*
* Generated by Trelent
*/
function updateWiki(oldVersion, newVersion) {
const wikiDir = "./tmp/wiki";
const howToUpdateFilename = "./tmp/wiki/🆙-How-to-Update.md";