add gitea and pathman

This commit is contained in:
AJ ONeal
2020-05-03 10:46:27 +00:00
parent aa8e5f6bc3
commit c32ea6d98e
3 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ function getAllReleases(request, owner, repo, baseurl) {
module.exports = getAllReleases;
if (module === require.main) {
getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
getAllReleases(require('@root/request'), 'coolaj86', 'go-pathman', 'https://git.coolaj86.com').then(
//getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
function (all) {
console.log(JSON.stringify(all, null, 2));
}
+1
View File
@@ -31,6 +31,7 @@ function getAllReleases(request, owner, repo, baseurl = 'https://api.github.com'
release['assets'].forEach((asset) => {
const name = asset['name'];
all.releases.push({
name: name,
version: release['tag_name'], // TODO tags aren't always semver / sensical
lts: /\b(lts)\b/.test(release['tag_name']),
channel: !release['prerelease'] ? 'stable' : 'beta',
+18
View File
@@ -0,0 +1,18 @@
'use strict';
var github = require('../_common/gitea.js');
var owner = 'coolaj86';
var repo = 'go-pathman';
var baseurl = 'https://git.coolaj86.com'
module.exports = function (request) {
return github(request, owner, repo, baseurl).then(function (all) {
return all;
});
};
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
console.log(JSON.stringify(all, null, 2));
});
}