cloudron 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cloudron
CHANGED
package/package.json
CHANGED
package/src/actions.js
CHANGED
|
@@ -1460,11 +1460,13 @@ function pull(remote, local, options) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
|
-
function init() {
|
|
1463
|
+
function init(options) {
|
|
1464
1464
|
const manifestFilePath = helper.locateManifest();
|
|
1465
1465
|
if (manifestFilePath && path.dirname(manifestFilePath) === process.cwd()) return exit('CloudronManifest.json already exists in current directory');
|
|
1466
1466
|
|
|
1467
|
-
const
|
|
1467
|
+
const manifestTemplateFilename = options.appstore ? 'CloudronManifest.appstore.json.ejs' : 'CloudronManifest.json.ejs';
|
|
1468
|
+
|
|
1469
|
+
const manifestTemplate = fs.readFileSync(path.join(__dirname, 'templates/', manifestTemplateFilename), 'utf8');
|
|
1468
1470
|
const dockerfileTemplate = fs.readFileSync(path.join(__dirname, 'templates/', 'Dockerfile.ejs'), 'utf8');
|
|
1469
1471
|
const dockerignoreTemplate = fs.readFileSync(path.join(__dirname, 'templates/', 'dockerignore.ejs'), 'utf8');
|
|
1470
1472
|
const startShTemplate = fs.readFileSync(path.join(__dirname, 'templates/', 'start.sh.ejs'), 'utf8');
|
|
@@ -1500,6 +1502,12 @@ function init() {
|
|
|
1500
1502
|
fs.chmodSync('start.sh', 0o0775);
|
|
1501
1503
|
}
|
|
1502
1504
|
|
|
1505
|
+
if (options.appstore) {
|
|
1506
|
+
if (!fs.existsSync('.gitignore')) fs.writeFileSync('.gitignore', 'node_modules/\n', 'utf8');
|
|
1507
|
+
if (!fs.existsSync('DESCRIPTION.md')) fs.writeFileSync('DESCRIPTION.md', '## About\n\nThis app changes everything\n\n', 'utf8');
|
|
1508
|
+
if (!fs.existsSync('POSTINSTALL.md')) fs.writeFileSync('POSTINSTALL.md', 'Post installation information\n\n', 'utf8');
|
|
1509
|
+
if (!fs.existsSync('CHANGELOG')) fs.writeFileSync('CHANGELOG', '[0.1.0]\n* Initial version\n\n', 'utf8');
|
|
1510
|
+
}
|
|
1503
1511
|
|
|
1504
1512
|
console.log();
|
|
1505
1513
|
console.log('Now edit the CloudronManifest.json');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "<%- version %>",
|
|
3
|
+
"upstreamVersion": "",
|
|
4
|
+
"minBoxVersion": "7.1.0",
|
|
5
|
+
"title": "",
|
|
6
|
+
"author": "",
|
|
7
|
+
"description": "file://DESCRIPTION.md",
|
|
8
|
+
"tagline": "",
|
|
9
|
+
"website": "",
|
|
10
|
+
"contactEmail": "",
|
|
11
|
+
"icon": "file://logo.png",
|
|
12
|
+
"healthCheckPath": "/",
|
|
13
|
+
"mediaLinks": [],
|
|
14
|
+
"httpPort": <%- httpPort %>,
|
|
15
|
+
"tags": [],
|
|
16
|
+
"changelog": "file://CHANGELOG",
|
|
17
|
+
"postInstallMessage": "file://POSTINSTALL.md",
|
|
18
|
+
"documentationUrl": "",
|
|
19
|
+
"forumUrl": "",
|
|
20
|
+
"addons": {
|
|
21
|
+
"localstorage": {}
|
|
22
|
+
},
|
|
23
|
+
"manifestVersion": 2
|
|
24
|
+
}
|