Skip to content

Commit 97739de

Browse files
Merge branch 'main' into feature/wikiRunnerCreateFile
2 parents 3ea45ed + cc2d022 commit 97739de

25 files changed

Lines changed: 508 additions & 259 deletions

File tree

.github/workflows/syncDocs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ jobs:
3737
echo ">"
3838
git diff-index --quiet HEAD & git status -s
3939
echo "<"
40-
echo "TO_BE_CANCELLED=$(if [[ $(git diff-index --quiet HEAD & git status -s) ]]; then echo "false"; else echo "true"; fi)" >> $GITHUB_ENV
41-
echo "$TO_BE_CANCELLED"
40+
echo "COMPILER_TO_BE_CANCELLED=$(if [[ $(git diff-index --quiet HEAD & git status -s) ]]; then echo "false"; else echo "true"; fi)" >> $GITHUB_ENV
41+
echo "$COMPILER_TO_BE_CANCELLED"
4242
- name: Copy docs and consolidate links to ${REPO_TUTORIAL_DEST} Repository
43-
if: ${{ env.TO_BE_CANCELLED == 'false' }}
4443
run: |
4544
cp -rf ${REPO_COMPILER_SOURCE}/documentation/* ${REPO_TUTORIAL_DEST}/
4645
cd ${REPO_TUTORIAL_DEST}
@@ -52,29 +51,30 @@ jobs:
5251
echo ">"
5352
git diff-index --quiet HEAD & git status -s
5453
echo "<"
55-
echo "TO_BE_CANCELLED=$(if [[ $(git diff-index --quiet HEAD & git status -s) ]]; then echo "false"; else echo "true"; fi)" >> $GITHUB_ENV
56-
echo "$TO_BE_CANCELLED"
54+
echo "TUTORIAL_TO_BE_CANCELLED=$(if [[ $(git diff-index --quiet HEAD & git status -s) ]]; then echo "false"; else echo "true"; fi)" >> $GITHUB_ENV
55+
echo "$TUTORIAL_TO_BE_CANCELLED"
5756
- name: setup git user
58-
if: ${{ env.TO_BE_CANCELLED == 'false' }}
57+
if: ${{ env.COMPILER_TO_BE_CANCELLED == 'false' || env.TUTORIAL_TO_BE_CANCELLED == 'false'}}
5958
run: |
6059
git config --global user.email ${BUILD_USER_EMAIL}
6160
git config --global user.name ${BUILD_USER}
6261
- name: Sync Wiki
63-
if: ${{ env.TO_BE_CANCELLED == 'false' }}
62+
if: ${{ env.COMPILER_TO_BE_CANCELLED == 'false' }}
6463
run: |
6564
cd ${REPO_COMPILER_DEST}
6665
git status
6766
git add .
6867
git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER"
6968
git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_COMPILER_DEST}.git"
70-
git push origin-wiki main
69+
git push origin-wiki master
7170
- name: Sync Wiki ${REPO_TUTORIAL_DEST} Repository
72-
if: ${{ env.TO_BE_CANCELLED == 'false' }}
71+
if: ${{ env.TUTORIAL_TO_BE_CANCELLED == 'false' }}
7372
run: |
7473
cd ${REPO_TUTORIAL_DEST}
74+
git pull
7575
git status
7676
git add .
7777
git commit -m "${REPO_COMPILER_SOURCE} documentation | GitHub Actions $GITHUB_WORKFLOW $GITHUB_RUN_NUMBER"
7878
git remote add origin-wiki "https://${BUILD_USER}:${BUILD_USER_PASSWD}@github.com/${ORG}/${REPO_TUTORIAL_DEST}.git"
79-
git push origin-wiki main
79+
git push origin-wiki master
8080

assertions/noException.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { RunResult } from "../engine/run_result";
33
export class NoException {
44
public static run(result: RunResult): void {
55
if(result.exceptions.length > 0) {
6-
throw new Error("Unexpected exception.");
6+
throw new Error("Unexpected exception: " + result.exceptions.join());
77
}
88
}
99
}

documentation/Assertions.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
## Assertions
22
The following assertions are already implemented:
3-
* directoryExist
4-
* directoryNotEmpty
5-
* fileExist
6-
* fileContains
7-
* noErrorCode
8-
* noException
9-
* repositoryIsClean
10-
* serverIsReachable
3+
* [directoryExist](#directoryExist)
4+
* [directoryNotEmpty](#directoryNotEmpty)
5+
* [fileExist](#fileExist)
6+
* [fileContains](#fileContains)
7+
* [noErrorCode](#noErrorCode)
8+
* [noException](#noExceptions)
9+
* [repositoryIsClean](#repositoryIsClean)
10+
* [serverIsReachable](#serverIsReachable)
1111

1212
***
1313

14-
### directoryExist
14+
### directoryExist <a name="directoryExist"></a>
1515
#### description
1616
Checks if a given path leads to an existing directory.
1717
#### parameter
1818
1. Path as a string, which should lead to an existing directory.
1919

2020
***
2121

22-
### directoryNotEmpty
22+
### directoryNotEmpty <a name="directoryNotEmpty"></a>
2323
#### description
2424
Checks if a given directory contain at least one file or subdirectory.
2525
#### parameter
2626
1. Path as a string of a directory.
2727

2828
***
2929

30-
### fileExist
30+
### fileExist <a name="fileExist"></a>
3131
#### description
3232
Checks if a given path leads to an existing file.
3333
#### parameter
3434
1. Path as a string
3535

3636
***
3737

38-
### fileContains
38+
### fileContains <a name="fileContains"></a>
3939
#### description
4040
Checks if content is included in a file
4141
#### parameter
@@ -44,31 +44,31 @@ Checks if content is included in a file
4444

4545
***
4646

47-
### noErrorCode
47+
### noErrorCode <a name="noErrorCode"></a>
4848
#### description
4949
Checks if the given RunResult has an returnCode of 0 otherwise throwing Error.
5050
#### parameter
5151
1. RunResult
5252

5353
***
5454

55-
### noException
55+
### noException <a name="noException"></a>
5656
#### description
5757
Checks if the given RunResult's exception Array is empty otherwise throwing Error.
5858
#### parameter
5959
1. RunResult
6060

6161
***
6262

63-
### repositoryIsClean
63+
### repositoryIsClean <a name="repositoryIsClean"></a>
6464
#### description
6565
Checks if the given directory is a git repository and is clean, meaning there are no uncommited changes.
6666
#### parameter
6767
1. Path of a directory as a string.
6868

6969
***
7070

71-
### serverIsReachable
71+
### serverIsReachable <a name="serverIsReachable"></a>
7272
#### description
7373
Checks if a server is available on localhost.
7474
#### parameter

documentation/Development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure
66

77
### How to create a playbook
88
The playbooks for the tutorial-compiler are contained in the tutorials repository. There you will find a description of how to create your own playbook.
9-
https://github.com/devonfw-tutorials/tutorials/wiki/Development
9+
https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Tutorials
1010

1111
### How to create your own command
1212
To create a new command you can use in your playbooks, you have to implement a new function for this command in all runner class you want to support this command. If you want to use the command only in katacoda tutorials for example, you have to implement the function only in the katacoda runner class.

0 commit comments

Comments
 (0)