Skip to content

Commit be74445

Browse files
Merge pull request #297 from EduardKrieger/bugfix/variousWikiRunnerBugs
bugfix: fixed various bugs in WikiRunner
2 parents 6a5fde9 + 676e789 commit be74445

27 files changed

+171
-123
lines changed

engine/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class Parser {
105105
let result = description;
106106
let offset = 0;
107107
for(let i = 0; i < description.length-1; i++){
108-
if(description[i] == '#' && description[i+1] == '#'){
108+
if(description[i] == '#' && description[i+1] == '#' && description[i+2] == '#'){
109109
let temp = result.slice(0,i+offset);
110110
result = temp +"\n"+result.slice(i+offset);
111111
offset++;

runners/console/index.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -954,14 +954,15 @@ export class Console extends Runner {
954954
}
955955
}
956956
}
957-
}
958-
for(let proc of systemProcesses){
959-
if(path.normalize(proc.path).includes(path.normalize(this.getWorkingDirectory()))){
960-
try {
961-
process.kill(proc.pid);
962-
} catch(e) {
963-
console.error("Error killing process "+proc.name+" with id: " + proc.pid , e);
964-
}
957+
}
958+
}
959+
systemProcesses = await snapshot("name", "pid", "ppid", "path");
960+
for(let proc of systemProcesses){
961+
if(path.normalize(proc.path).includes(path.normalize(this.getWorkingDirectory()))){
962+
try {
963+
process.kill(proc.pid);
964+
} catch(e) {
965+
console.error("Error killing process "+proc.name+" with id: " + proc.pid , e);
965966
}
966967
}
967968
}

runners/wikiConsole/templates/adaptTemplates.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
3-
4-
=== Generate CobiGen templates
5-
<%if(text){%><%- text; %><%}%>
1+
<% if(title){ %>== <%= title;%>
2+
=== Generate CobiGen templates
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Generate CobiGen templates
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Generate CobiGen templates
7+
<%if(text){%><%- text; %><%}%> <%}%>
68

79
How to use CobiGen, to generate templates for the following code generation.
810
More information about CobiGen on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc.html.

runners/wikiConsole/templates/addSetupScript.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
3-
1+
<% if(title){ %>== <%= title;%>
42
=== Run a setup script
5-
<%if(text){%><%- text; %><%}%><%}%>
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Run a setup script
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Run a setup script
7+
<%if(text){%><%- text; %><%}%> <%}%>
68

79
Run a Script to setup the enviroment for the Tutorial.
810

@@ -39,7 +41,7 @@ A file explorer window opens where you should set the filename to *<%= scriptNam
3941
. Windows +
4042
Open the PowerShell in your current workspace and execute the command `./<%= scriptNameWindows; %>` to run the script.
4143
. Linux and macOS +
42-
Open the Terminal in your current workspace and execute the command `bash <%= scriptNameWindows; %>` to run the script.
44+
Open the Terminal in your current workspace and execute the command `bash <%= scriptNameLinux; %>` to run the script.
4345

4446
<%if(textAfter){%><%- textAfter; %><%}%>
4547

runners/wikiConsole/templates/buildJava.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
3-
4-
=== Build the Java Project with Maven
5-
<%if(text){%><%- text; %><%}%><%}%>
1+
<% if(title){ %>== <%= title;%>
2+
=== Build the Java project with Maven
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Build the Java project with Maven
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Build the Java project with Maven
7+
<%if(text){%><%- text; %><%}%> <%}%>
68

79
==== Prerequisites
810

runners/wikiConsole/templates/buildNg.asciidoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
1+
<% if(title){ %>== <%= title;%>
2+
=== Build an Angular project
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Build an Angular project
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Build an Angular project
7+
<%if(text){%><%- text; %><%}%> <%}%>
38

4-
=== Build an Angular Project
5-
<%if(text){%><%- text; %><%}%><%}%>
69

710
==== Prerequisites
811
* You need to have either installed the devonfw-ide with an Angular installation or installed https://angular.io/[Angular] seperatly on your system.

runners/wikiConsole/templates/cloneRepository.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
3-
1+
<% if(title){ %>== <%= title;%>
42
=== Clone Repository
5-
<%if(text){%><%- text; %><%}%><%}%>
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Clone Repository
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Clone Repository
7+
<%if(text){%><%- text; %><%}%> <%}%>
68

79
==== Prerequisites
810
* You need to have Git installed. You can download Git https://git-scm.com/downloads[here] for your OS and install it by following the instructions.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
== Conclusion
21

3-
4-
<%= conclusion; %>
2+
<%= conclusion; %>

runners/wikiConsole/templates/createDevon4jProject.asciidoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
1+
<% if(title){ %>== <%= title;%>
2+
=== Create a new devon4j project from command promt
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Create a new devon4j project from command promt
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Create a new devon4j project from command promt
7+
<%if(text){%><%- text; %><%}%> <%}%>
38

4-
=== Create a new devon4j project from command prompt
5-
<%if(text){%><%- text; %><%}%><%}%>
69
==== Prerequisites
710

811
In order to create a new application you must use the archetype provided by devon4j which uses the https://maven.apache.org/guides/introduction/introduction-to-archetypes.html[maven archetype functionality].

runners/wikiConsole/templates/createFolder.asciidoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
<%if(title){%>== <%- title; %>
2-
<%if(text){%><%- text; %><%}%><%}else{%>
1+
<% if(title){ %>== <%= title;%>
2+
=== Create folder
3+
<%if(text){%><%- text; %> <%}%>
4+
<%}else if(title === undefined){%>=== Create folder
5+
<%if(text){%><%- text; %> <%}%>
6+
<%}else if(title === null){ %>== Create folder
7+
<%if(text){%><%- text; %><%}%> <%}%>
38

49
=== Create folder
510
<%if(text){%><%- text; %><%}%><%}%>

0 commit comments

Comments
 (0)