From e9c299daff943018dd9253e6f05eab669969ec2f Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sun, 13 Jan 2019 10:07:08 -0800 Subject: renamed files, fixed adminer optinal field --- build_and_publish_to_github_pages.js | 23 +++++++++++++++++++++++ index.js | 23 ----------------------- package.json | 2 +- public/v1/apps/adminer.json | 6 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 build_and_publish_to_github_pages.js delete mode 100644 index.js diff --git a/build_and_publish_to_github_pages.js b/build_and_publish_to_github_pages.js new file mode 100644 index 0000000..99eb249 --- /dev/null +++ b/build_and_publish_to_github_pages.js @@ -0,0 +1,23 @@ +const ghpages = require('gh-pages'); +const path = require('path'); +const fs = require('fs-extra') + +const pathOfPublic = path.join(__dirname, 'public'); +const pathOfV1 = path.join(pathOfPublic, 'v1'); +const pathOfApps = path.join(pathOfV1, 'apps'); +const pathOfList = path.join(pathOfV1, 'autoGeneratedList.json'); + +fs.readdir(pathOfApps, function(err, items) { + for (var i = 0; i < items.length; i++) { + items[i] = items[i].replace('.json', '') + } + + fs.outputJsonSync(pathOfList, { + appList: items + }) + + ghpages.publish('public', function(err) { + console.log(err) + }); + +}); diff --git a/index.js b/index.js deleted file mode 100644 index 99eb249..0000000 --- a/index.js +++ /dev/null @@ -1,23 +0,0 @@ -const ghpages = require('gh-pages'); -const path = require('path'); -const fs = require('fs-extra') - -const pathOfPublic = path.join(__dirname, 'public'); -const pathOfV1 = path.join(pathOfPublic, 'v1'); -const pathOfApps = path.join(pathOfV1, 'apps'); -const pathOfList = path.join(pathOfV1, 'autoGeneratedList.json'); - -fs.readdir(pathOfApps, function(err, items) { - for (var i = 0; i < items.length; i++) { - items[i] = items[i].replace('.json', '') - } - - fs.outputJsonSync(pathOfList, { - appList: items - }) - - ghpages.publish('public', function(err) { - console.log(err) - }); - -}); diff --git a/package.json b/package.json index 15690f5..16d6c3e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "CapRover-one-click-apps", "version": "1.0.0", "description": "One Click App Repository for CapRover", - "main": "index.js", + "main": "build_and_publish_to_github_pages.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/public/v1/apps/adminer.json b/public/v1/apps/adminer.json index 13b1a3f..da0dcee 100644 --- a/public/v1/apps/adminer.json +++ b/public/v1/apps/adminer.json @@ -1,6 +1,6 @@ { "captainVersion": "1", - "documentation": "Taken from https://hub.docker.com/_/adminer except it is manually adjusted for port 80", + "documentation": "Taken from https://hub.docker.com/_/adminer ", "dockerCompose": { "version": "3.3", @@ -35,13 +35,13 @@ "id": "$$cap_adminer_design", "label": "OPTIONAL: Adminer Design", "description": "List of designs: https://github.com/vrana/adminer/tree/master/designs", - "validRegex": "/^([a-zA-Z0-9-.])+$/" + "validRegex": "/^([a-zA-Z0-9-.])*$/" }, { "id": "$$cap_adminer_plugins", "label": "OPTIONAL: Adminer plugins (space separated)", "defaultValue": "", - "validRegex": "/^([a-zA-Z0-9-.\\s])+$/" + "validRegex": "/^([a-zA-Z0-9-.\\s])*$/" }] } -- cgit v1.2.3