Skip to content

Commit

Permalink
Update README.md code block format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lam Trinh committed Aug 2, 2024
1 parent 7af6b25 commit 4fd54aa
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ structure and can therefore be opened in Android Studio or any other IDE or edit

The easiest and recommended way to build the Android project including the `mullvad-daemon` and
`wireguard-go` is to use the following command (which requires `podman`):
```
```bash
../building/containerized-build.sh android --dev-build
```
See the [build instructions](BuildInstructions.md) for further information.
Expand All @@ -44,12 +44,12 @@ In order to format XML files, the script `scripts/tidy.sh` is used. As the scrip
container image is used.

Command to format:
```
```bash
scripts/tidy.sh format
```

Command to format and check for any changes:
```
```bash
scripts/tidy.sh formatAndCheckDiff
```

Expand Down
10 changes: 5 additions & 5 deletions android/test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ The tests in this module are end-to-end tests that rely on the publicly accessib
## How to run the tests
### Locally
Set tokens in the below command and then execute the command in the `android` directory to run the tests on a local device:
```
```bash
./gradlew :test:e2e:connectedDebugAndroidTest \
-Pvalid_test_account_number=XXXX \
-Pinvalid_test_account_number=XXXX
```

For convenience, the tokens can also be set in `<REPO-ROOT>/android/local.properties` in the following way:
```
```properties
valid_test_account_number=XXXX
invalid_test_account_number=XXXX
```

It's also possible to provide the tokens to the test runner during test execution. However note that this requires [the APKs to be installed manually](https://developer.android.com/training/testing/instrumented-tests/androidx-test-libraries/runner#architecture).
```
```bash
adb shell 'CLASSPATH=$(pm path androidx.test.services) app_process / \
androidx.test.services.shellexecutor.ShellMain am instrument -w \
-e clearPackageData true \
Expand All @@ -34,7 +34,7 @@ Firebase Test Lab can be used to run the tests on vast collection of physical an
1. Setup the gcloud CLI by following the [official documentation](https://firebase.google.com/docs/test-lab/android/command-line).

2. Set tokens in the below command and then execute the command in the `android` directory to run the tests (on a Pixel 5e):
```
```bash
gcloud firebase test android run \
--type instrumentation \
--app ./android/app/build/outputs/apk/debug/app-debug.apk \
Expand All @@ -45,7 +45,7 @@ gcloud firebase test android run \
```

If using gcloud via the docker image, the following can be executed in the `android` directory to run the tests (on a Pixel 5e):
```
```bash
docker run --rm --volumes-from gcloud-config -v ${PWD}:/android gcr.io/google.com/cloudsdktool/google-cloud-cli gcloud firebase test android run \
--type instrumentation \
--app ./android/app/build/outputs/apk/debug/app-debug.apk \
Expand Down
6 changes: 3 additions & 3 deletions building/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the container images to ghcr.io.

If you `sudo` into a `build` account that do the builds, you need to set the permissions on the tty,
so podman can ask for the passphrase for the gpg key:
```
```bash
realuser@server $ sudo chown build:build $(tty)
realuser@server $ sudo -u build -i
```
Expand All @@ -28,7 +28,7 @@ https://docs.github.com/en/packages/working-with-a-github-packages-registry/work
Build and publish the container image. Tag it with the github hash of the current commit.
This also adds the container GPG signatures to the sigstore and commits that to git.
The single sigstore addition (signed) commit can be pushed directly to the main branch without PR.
```
```bash
# Builds a new container image, pushes it to the registry, signs it and commits the signatures in git
./build-and-publish-container-image.sh (linux|android)

Expand Down Expand Up @@ -68,7 +68,7 @@ verification steps](#pulling-verifying-and-using-build-images) with some slight
These instructions describe how anyone can pull the images and verify them with GPG before using them.
Copy the Mullvad app container signing GPG key to somewhere outside the repository (so a `git pull` can't overwrite it with a malicious key):
```
```bash
cp ${repo}/building/mullvad-app-container-signing.asc /path/to/mullvad-app-container-signing.asc
```

Expand Down
4 changes: 2 additions & 2 deletions graphics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ listing. The resulting 512x512 PNG image should be placed in the
`android/app/src/main/play/listings/en-US/graphics/icon/` directory. The file can be generate with the
following command:

```
```bash
rsvg-convert ./icon-square.svg -w 512 -h 512 -o ../android/app/src/main/play/listings/en-US/graphics/icon/icon.png
```

#### iOS

`icon-square.svg` is used to generate the app icon for iOS. To regenerate the assets run:
```
```bash
ios/convert-assets.rb --app-icon
```

Expand Down
8 changes: 4 additions & 4 deletions gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ The app has unit tests and integration tests located in test/:

The tests in **test/e2e/installed** are run against the already installed app using the currently
running daemon. It's possible to run these tests on any machine with the app installed by running
```
```bash
npm run e2e:sequential installed/<test>
```
or without building by running
```
```bash
npm run e2e:sequential:no-build installed/<test>
```

It is also possible to build these tests along with all its dependencies into an executable that can
be run on any computer that has the app installed. The command for building the test executable is:
```
```bash
npm run build-test-executable
```
The executable for all platforms are outputted to `/dist/`.
Expand All @@ -43,7 +43,7 @@ The build is configured in `standalone-tests.ts`

The artifact can be run by either calling without arguments or with specific tests. A lot of the
tests are depending on the daemon already being in a specific state and will fail if it's not.
```
```bash
./mullvadvpn-app-e2e-tests-linux state-dependent/location.spec
```

Expand Down
8 changes: 4 additions & 4 deletions gui/locales/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is a folder with gettext translations for Mullvad VPN app.

1. ZIP file with the following command:

```
```bash
cd gui/locales
zip payload.zip <NEW_LOCALE>/relay-locations.po
```
Expand All @@ -42,7 +42,7 @@ This is a folder with gettext translations for Mullvad VPN app.

Use the localization script to sync localizations by running the following command from the
root-directory:
```
```bash
./scripts/localization sync-local-files
```

Expand All @@ -53,7 +53,7 @@ all local files are in sync.

Use the localization script to prepare the pot-files by running the following command from the
root-directory:
```
```bash
./scripts/localization prepare
```

Expand All @@ -80,7 +80,7 @@ CROWDIN_API_KEY=$YOUR_CROWDIN_KEY `./scripts/localization download`
Use the localization script to verify that the strings are valid HTML and that they contain the
correct amount of format specifiers:
```
```bash
./scripts/localization verify
```

Expand Down
4 changes: 2 additions & 2 deletions gui/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ and `integrate-relay-locations.py` in this directory.

1. Freeze dependencies:

```
```bash
pip3 freeze -r requirements.txt
```

Expand All @@ -36,6 +36,6 @@ and save the output into `requirements.txt`.

2. Hash them with `hashin` tool:

```
```bash
hashin --python 3.7 --verbose --update-all
```
14 changes: 7 additions & 7 deletions ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ instructions document.
The codebase is formatted using [SwiftFormat](https://github.com/nicklockwood/SwiftFormat). Please
format all contributions using the latest version of formatter.

```
```bash
swiftformat ios/
```

Install the latest version of SwiftFormat via Homebrew:

```
```bash
brew install swiftformat
```

CI uses the latest version available on Homebrew to check formatting, so please keep your local
installation up to date, if you see it complain:

```
```bash
brew upgrade swiftformat
```

Expand All @@ -46,13 +46,13 @@ configuration.

1. Create the build configuration using a template file:

```
```bash
cp ios/Configurations/Screenshots.xcconfig.template ios/Configurations/Screenshots.xcconfig
```

1. Edit the configuration file and put your account number without quotes:

```
```bash
vim ios/Configurations/Screenshots.xcconfig
```

Expand All @@ -62,7 +62,7 @@ configuration.
1. Install Ruby 2.5.1 or later using `rvm install <VERSION>`.
1. Install necessary third-party ruby gems:

```
```bash
cd ios
bundle install
```
Expand All @@ -71,7 +71,7 @@ configuration.

Run the following command to take screenshots:

```
```bash
cd ios
bundle exec fastlane snapshot
```
Expand Down

0 comments on commit 4fd54aa

Please sign in to comment.