From e08359f7e06698ec8d8bec54032edf2d8231be3b Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 21 Dec 2021 17:55:30 +0100 Subject: [PATCH] Tools: Removed no longer needed double-dash and fixed CI --- .github/scripts/run_ci.sh | 4 ++-- BUILD.md | 2 +- CONTRIBUTING.md | 4 ++-- DEPLOY.md | 2 +- packages/app-cli/createUsers.sh | 2 +- .../app-cli/tests/support/serverPerformances/testPerf.sh | 8 ++++---- packages/app-desktop/runForTesting.sh | 4 ++-- packages/app-desktop/testPluginDemo.sh | 2 +- packages/lib/testing/test-utils.ts | 2 +- packages/server/package.json | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/scripts/run_ci.sh b/.github/scripts/run_ci.sh index c1c00fb7c6..5d5994d5de 100755 --- a/.github/scripts/run_ci.sh +++ b/.github/scripts/run_ci.sh @@ -171,8 +171,8 @@ if [[ $GIT_TAG_NAME = v* ]]; then elif [[ $GIT_TAG_NAME = server-v* ]] && [[ $IS_LINUX = 1 ]]; then echo "Step: Building Docker Image..." cd "$ROOT_DIR" - yarn run buildServerDocker -- --tag-name $GIT_TAG_NAME --push-images + yarn run buildServerDocker --tag-name $GIT_TAG_NAME --push-images else echo "Step: Building but *not* publishing desktop application..." - USE_HARD_LINKS=false yarn run dist -- --publish=never + USE_HARD_LINKS=false yarn run dist --publish=never fi diff --git a/BUILD.md b/BUILD.md index 9394b78d08..61373115c5 100644 --- a/BUILD.md +++ b/BUILD.md @@ -75,7 +75,7 @@ Running `yarn run tsc` would have the same effect, but without watching. You can specify additional parameters when running the desktop or CLI application. To do so, add `--` to the `yarn start` command, followed by your flags. For example: - yarn start -- --debug + yarn start --debug ## TypeScript diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3abbbea4a4..414dde442e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,13 +74,13 @@ yarn test To run just one particular file: ```sh -yarn test -- --filter=markdownUtils # Don't add the .js extension +yarn test --filter=markdownUtils # Don't add the .js extension ``` To filter tests. For example, to run all the test units that contain "should handle conflict" in their description: ```sh -yarn test -- --filter="should handle conflict" +yarn test --filter="should handle conflict" ``` ## About abandoned pull requests diff --git a/DEPLOY.md b/DEPLOY.md index 5348a86d43..55ebe04092 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -20,7 +20,7 @@ The desktop application is built for Windows, macOS and Linux via continuous int The app is built and upload to GitHub using: - yarn run releaseAndroid -- --type=prerelease + yarn run releaseAndroid --type=prerelease The "type" parameter can be either "release" or "prerelease" diff --git a/packages/app-cli/createUsers.sh b/packages/app-cli/createUsers.sh index 3fca52ae2a..6eb733cef9 100755 --- a/packages/app-cli/createUsers.sh +++ b/packages/app-cli/createUsers.sh @@ -48,5 +48,5 @@ while [ "$NUM" -lt 400 ]; do echo "config sync.10.password hunter1hunter2hunter3" >> "$CMD_FILE" echo "sync" >> "$CMD_FILE" - yarn start -- --profile "$PROFILE_DIR" batch "$CMD_FILE" + yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE" done diff --git a/packages/app-cli/tests/support/serverPerformances/testPerf.sh b/packages/app-cli/tests/support/serverPerformances/testPerf.sh index 0608e9a27e..8ec6fedef9 100755 --- a/packages/app-cli/tests/support/serverPerformances/testPerf.sh +++ b/packages/app-cli/tests/support/serverPerformances/testPerf.sh @@ -52,7 +52,7 @@ do done cd "$ROOT_DIR/packages/app-cli" -yarn start -- --profile "$PROFILE_DIR" batch "$CMD_FILE" -yarn start -- --profile "$PROFILE_DIR" import ~/Desktop/Joplin_17_06_2021.jex -# yarn start -- --profile "$PROFILE_DIR" import ~/Desktop/Tout_18_06_2021.jex -yarn start -- --profile "$PROFILE_DIR" sync --use-lock 1 +yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE" +yarn start --profile "$PROFILE_DIR" import ~/Desktop/Joplin_17_06_2021.jex +# yarn start --profile "$PROFILE_DIR" import ~/Desktop/Tout_18_06_2021.jex +yarn start --profile "$PROFILE_DIR" sync --use-lock 1 diff --git a/packages/app-desktop/runForTesting.sh b/packages/app-desktop/runForTesting.sh index 94729f9a0b..8d63d08949 100755 --- a/packages/app-desktop/runForTesting.sh +++ b/packages/app-desktop/runForTesting.sh @@ -101,11 +101,11 @@ do done cd "$ROOT_DIR/packages/app-cli" -yarn start -- --profile "$PROFILE_DIR" batch "$CMD_FILE" +yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE" if [[ $COMMANDS != "" ]]; then exit 0 fi cd "$ROOT_DIR/packages/app-desktop" -yarn start -- --profile "$PROFILE_DIR" +yarn start --profile "$PROFILE_DIR" diff --git a/packages/app-desktop/testPluginDemo.sh b/packages/app-desktop/testPluginDemo.sh index c1f3ca3594..cd75593785 100755 --- a/packages/app-desktop/testPluginDemo.sh +++ b/packages/app-desktop/testPluginDemo.sh @@ -5,4 +5,4 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" PLUGIN_PATH="$SCRIPT_DIR/../app-cli/tests/support/plugins/toc" -yarn i --prefix="$PLUGIN_PATH" && yarn start -- --dev-plugins "$PLUGIN_PATH" \ No newline at end of file +yarn i --prefix="$PLUGIN_PATH" && yarn start --dev-plugins "$PLUGIN_PATH" \ No newline at end of file diff --git a/packages/lib/testing/test-utils.ts b/packages/lib/testing/test-utils.ts index 313429fd6d..f528476ad7 100644 --- a/packages/lib/testing/test-utils.ts +++ b/packages/lib/testing/test-utils.ts @@ -542,7 +542,7 @@ async function loadEncryptionMasterKey(id: number = null, useExisting = false) { function mustRunInBand() { if (!process.argv.includes('--runInBand')) { - throw new Error('Tests must be run sequentially for this sync target, with the --runInBand arg. eg `npm test -- --runInBand`'); + throw new Error('Tests must be run sequentially for this sync target, with the --runInBand arg. eg `yarn test --runInBand`'); } } diff --git a/packages/server/package.json b/packages/server/package.json index ad6b385db2..dc517fc268 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -11,7 +11,7 @@ "devDropTables": "node dist/app.js --env dev --drop-tables", "devDropDb": "node dist/app.js --env dev --drop-db", "start": "node dist/app.js", - "generateTypes": "rm -f db-buildTypes.sqlite && yarn run start -- --env buildTypes migrate latest && node dist/tools/generateTypes.js && mv db-buildTypes.sqlite schema.sqlite", + "generateTypes": "rm -f db-buildTypes.sqlite && yarn run start --env buildTypes migrate latest && node dist/tools/generateTypes.js && mv db-buildTypes.sqlite schema.sqlite", "tsc": "tsc --project tsconfig.json", "test": "jest --verbose=false", "test-ci": "yarn test",