Amend app.repository depending on presence and value of dockerImage
This commit is contained in:
@@ -138,6 +138,10 @@ exports = module.exports = {
|
||||
LOCATION_TYPE_REDIRECT: 'redirect',
|
||||
LOCATION_TYPE_ALIAS: 'alias',
|
||||
|
||||
// respositories, match with appstore
|
||||
REPOSITORY_CORE: 'core',
|
||||
REPOSITORY_COMMUNITY: 'community',
|
||||
|
||||
// exported for testing
|
||||
_validatePortBindings: validatePortBindings,
|
||||
_validateAccessRestriction: validateAccessRestriction,
|
||||
@@ -747,6 +751,11 @@ function postProcess(result) {
|
||||
delete result.errorJson;
|
||||
|
||||
result.taskId = result.taskId ? String(result.taskId) : null;
|
||||
|
||||
// package repository is currently determined by dockerImage
|
||||
if (!result.manifest.dockerImage) result.repository = '';
|
||||
else if (result.manifest.dockerImage.startsWith('cloudron/')) result.repository = exports.REPOSITORY_CORE;
|
||||
else result.repository = exports.REPOSITORY_COMMUNITY;
|
||||
}
|
||||
|
||||
function attachProperties(app, domainObjectMap) {
|
||||
|
||||
Reference in New Issue
Block a user