From ba583831aea6e5f364aa509a17ec5c12562056b4 Mon Sep 17 00:00:00 2001 From: Steffen Lange Date: Sat, 30 Jan 2021 16:22:11 +0100 Subject: [PATCH] Add XCA --- PatchObject.php | 2 +- modules/XCA.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/XCA.php diff --git a/PatchObject.php b/PatchObject.php index 4742626..4fda734 100644 --- a/PatchObject.php +++ b/PatchObject.php @@ -40,7 +40,7 @@ class PatchObject { } function setVersion(string $version, bool $trim = false) { if ($trim) { - $version = preg_replace('/^(release-|v)/', '', $version); + $version = preg_replace('/^(release-|RELEASE\.|v)/', '', $version); } $this->version = $version; } diff --git a/modules/XCA.php b/modules/XCA.php new file mode 100644 index 0000000..7b9bae6 --- /dev/null +++ b/modules/XCA.php @@ -0,0 +1,14 @@ +fetch('https://api.github.com/repos/chris2511/xca/releases/latest', true)) + return $this->parse_json('tag_name'); + return false; + } +} + +?>