Skip to content

Commit 597463d

Browse files
committed
added step descriptions to template
1 parent dda4618 commit 597463d

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

runners/wikiConsole/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ export class WikiConsole extends WikiRunner {
175175
}
176176

177177
runExecuteCommand(runCommand: RunCommand): RunResult{
178+
let text = this.checkForText(runCommand);
179+
let title = this.checkForTitle(runCommand);
180+
let textAfter = this.checkForTextAfter(runCommand);
178181
let currentdir = path.relative(this.getWorkingDirectory(), this.getVariable(this.WORKSPACE_DIRECTORY));
179182
let windowsCommand = runCommand.command.parameters[0];
180183
let linuxCommand = runCommand.command.parameters[1];
@@ -195,7 +198,8 @@ export class WikiConsole extends WikiRunner {
195198
: undefined;
196199

197200
this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "executeCommand.asciidoc"),
198-
{windowsCommand: windowsCommand, linuxCommand: linuxCommand, dir: dir, async: async, args: args, port: port, appPath: appPath, currentdir: currentdir});
201+
{windowsCommand: windowsCommand, linuxCommand: linuxCommand, dir: dir, async: async, args: args,
202+
port: port, appPath: appPath, currentdir: currentdir, title: title, text: text, textAfter: textAfter});
199203

200204
return null;
201205
}

runners/wikiConsole/templates/executeCommand.asciidoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
== Execute a command
1+
<%if(title){%>== <%- title; %>
2+
<%if(text){%><%- text; %><%}%><%}else{%>
23

3-
=== Execute a command in a command prompt
4+
=== Execute a command
5+
<%if(text){%><%- text; %><%}%>
6+
7+
==== Execute a command in a command prompt
48
First, you need to open a command prompt in your current Workspace. For Windows, you can use Powershell and on Linux, you can use the Terminal.
59
<% if(async){ %>The command wil start a server so that you have to open a new command prompt, that will be blocked while the server is running. <% } %>
610
Your current working folder should be *<startingFolder><% if(currentdir){ %>/<%= currentdir; %><%}%>*.
@@ -15,12 +19,15 @@ Then execute the command `<%- linuxCommand; %><% if(args){ %> <%- args; %><%}%>`
1519

1620
<% if(port){ %>
1721

18-
=== Startup Assertion
22+
==== Startup Assertion
1923

2024
You can check if the server is running correctly by checking if `localhost:<%= port; %>/<%= appPath; %>` is accessible by either using a tool like `curl`, `Postman` or simply accessing the service via your webbrowser.
2125

2226
Example: `curl -Is localhost:<%= port; %>/<%= appPath; %> | head -n 1`
2327

2428
This command should return an `200 OK` header if the service is available.
2529

26-
<% } %>
30+
<% } %>
31+
32+
<%if(textAfter){%><%- textAfter; %><%}%>
33+

0 commit comments

Comments
 (0)