Skip to content

Commit

Permalink
#10: fix for missing port management when installing a publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
reusr1 committed Mar 3, 2020
1 parent bfa4fbd commit 3fe2854
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/percli-server-install
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function serverInstall() {
slingproperties = `sling.run.modes=publish,notshared\norg.osgi.service.http.port=${port}`
} else if(args.author) {
name = 'author-'+port
slingproperties = `sling.run.modes=authir,notshared\norg.osgi.service.http.port=${port}`
slingproperties = `sling.run.modes=author,notshared\norg.osgi.service.http.port=${port}`
} else {
slingproperties = `org.osgi.service.http.port=${port}`
}
Expand All @@ -110,7 +110,7 @@ async function serverInstall() {
var packagesList = await getPackageList()

// step 6
await installPackages(packagesList)
await installPackages(packagesList, port)
}

} catch (err) {
Expand Down
8 changes: 4 additions & 4 deletions lib/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ module.exports = {
* @param {string} line - the line
* @return {string} the maven execution
*/
installFile: async function(mvn, line) {
installFile: async function(mvn, line, port) {
// return mvn.execute(
// ['io.wcm.maven.plugins:wcmio-content-package-maven-plugin:install'],
// {
Expand All @@ -389,7 +389,7 @@ module.exports = {
// "vault.serviceURL": "http://localhost:"+port+"/bin/cpm/package.service.html"
// }
// )
return spawnSync( 'node', [__dirname+'/../node_modules/@peregrinecms/slingpackager/bin/slingpackager', 'upload','-i', 'out/'+line] ,{
return spawnSync( 'node', [__dirname+'/../node_modules/@peregrinecms/slingpackager/bin/slingpackager', 'upload','-i', '--server', 'http://localhost:'+port, 'out/'+line] ,{
shell: true,
stdio: 'inherit'
})
Expand All @@ -399,10 +399,10 @@ module.exports = {
* Installs the packages
* @param {array} packages - the packages
*/
installPackages: async function(packages){
installPackages: async function(packages, port){
let mvn = maven.create()
for(let i = 0; i < packages.length; i++) {
await module.exports.installFile(mvn, packages[i])
await module.exports.installFile(mvn, packages[i], port)
}
},

Expand Down

0 comments on commit 3fe2854

Please sign in to comment.