Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.0.0
v22.2.0
8 changes: 8 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
"type": "string"
}
},
"before_cmds": {
"description": "Commands to run in the app directory just after cloning",
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"appsDir": {
"type": "string",
"description": "Directory in which to place the app",
Expand Down
5 changes: 4 additions & 1 deletion configs/v22.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"repo": "https://github.com/nextcloud/activity"
},
"circles": {
"repo": "https://github.com/nextcloud/circles"
"repo": "https://github.com/nextcloud/circles",
"before_cmds": [
"composer i"
]
},
"files_pdfviewer": {
"repo": "https://github.com/nextcloud/files_pdfviewer"
Expand Down
5 changes: 4 additions & 1 deletion configs/v22.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"repo": "https://github.com/nextcloud/activity"
},
"circles": {
"repo": "https://github.com/nextcloud/circles"
"repo": "https://github.com/nextcloud/circles",
"before_cmds": [
"composer i"
]
},
"files_pdfviewer": {
"repo": "https://github.com/nextcloud/files_pdfviewer"
Expand Down
5 changes: 4 additions & 1 deletion configs/v22.1.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"repo": "https://github.com/nextcloud/activity"
},
"circles": {
"repo": "https://github.com/nextcloud/circles"
"repo": "https://github.com/nextcloud/circles",
"before_cmds": [
"composer i"
]
},
"files_pdfviewer": {
"repo": "https://github.com/nextcloud/files_pdfviewer"
Expand Down
5 changes: 4 additions & 1 deletion configs/v22.2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"repo": "https://github.com/nextcloud/activity"
},
"circles": {
"repo": "https://github.com/nextcloud/circles"
"repo": "https://github.com/nextcloud/circles",
"before_cmds": [
"composer i"
]
},
"files_pdfviewer": {
"repo": "https://github.com/nextcloud/files_pdfviewer"
Expand Down
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,27 @@ async function addApp (appName, appsDir, appConfig) {
await appGit.submoduleUpdate();
}

await arbitraryCommandsApp(appName, appDir, appConfig);
await krankerlEnabledAppSetup(appName, appDir, appConfig);
await nextcloudIgnore(appName, appDir, appConfig);
await globRemove(appConfig.exclude, appDir);
}

/**
* Run commands given in before_cmds
* @param {String} appName Name of Nextcloud app to add
* @param {String} appDir Apps directory in Nextcloud
* @param {Object} appConfig App Config object
*/
async function arbitraryCommandsApp (appName, appDir, appConfig) {
logMessage(`${appName}: running config before_cmds`, LOGVERBOSITY.MEDIUM);
if (appConfig.before_cmds && appConfig.before_cmds.length > 0) {
appConfig.before_cmds.forEach(cmd => {
execSync(cmd, { cwd: appDir, stdio: 'inherit' });
});
}
}

/**
* Check if Krankerl is enabled then run Krankerl config
* @param {String} appName Name of Nextcloud app to add
Expand Down