mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 09:55:47 +08:00
Generated documentation :)
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user