Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
4.6 KiB
4.6 KiB
title, sidebar_position
| title | sidebar_position |
|---|---|
| Build and CLI commands | 2 |
Build
Here's a list of all the commands used by the Desktop App. These can all be found in package.json, and should be run using npm, using the following syntax: npm run <command>.
Testing and Verification
check- Runs ESLint, checks types, validates the build config and runs the unit testscheck-build-config- Builds and validates the build configcheck-types- Runs the TypeScript compiler against the code to check the types for errors
lint:js- Runs ESLint against the code and displays resultslint:js-quiet- Same as above, but with the --quiet optionfix:js- Save as above, but attempts to fix some of the issues
test- Builds and runs all of the automated tests for the Desktop Apptest:e2e- Builds and runs the E2E tests for the Desktop Apptest:e2e:no-rebuild- Runs the E2E tests without rebuilding the entire apptest:e2e:run- Runs the E2E tests without building themtest:e2e:send-report- Uploads E2E results
test:unit- Runs the unit tests for the main moduletest:unit-coverage- Runs the unit tests and displays a coverage breakdown
Building and Running
build- An amalgam of the following build commands, used to build the Desktop App:build:main- Builds the source code used by the Electron Main processbuild:renderer- Builds the source code used by the Electron Renderer processbuild:preload- Builds the source code used by the preload scripts run in the preload context of the Electron Renderer process
build-prod- Builds the app in production modebuild-prod-mas- Builds the app in production mode for Mac App Store distributionbuild-prod-upgrade- Builds the app in production mode with auto-update functionality
build-test- Builds the app for E2E testingbuild-test:e2e- Builds only the E2E tests and not the appbuild-test:robotjs- Builds the RobotJS test module for the current Electron version
start- Runs the Desktop App using the current code built in the dist/ folderrestart- Re-runs the build process and then starts the app (amalgam of build and start)watch- Runs the app, but watches for code changes and re-compiles on the fly when a file is changed
Packaging
package- Builds and creates distributable packages for all OSespackage:windows- Builds and creates distributable packages for Windowspackage:windows-zip- Builds and create distributable ZIP packages for Windowspackage:windows-installers- Builds and creates distributable MSI and EXE packages for Windows
package:mac- Builds and creates distributable packages for macOSpackage:mac-with-universal- Same as above, but includes a universal binary
package:mas- Builds and creates distributable packages for Mac App Storepackage:mas-dev- Same as above, but builds the development version for testing
package:linux- Builds and creates distributable packages for Linuxpackage:linux-tar- Builds and creates distributable .tar.gz packagesfor Linuxpackage:linux-pkg- Builds and creates distributable .deb packages for Ubuntu/Debian and .rpm for Red Hat/Fedorapackage:linux-appImage- Builds and creates distributable .AppImage packages for Linux
Workspace Utility
clean- Removes all installed Node modules and built codeclean-install- Same as above, but then runs npm install to reinstall the Node modulesclean-dist- Only removes the built code
prune- Runs ts-prune to display unused codei18n-extract- Scrape the codebase and adds missing translations to the translation filecreate-linux-dev-shortcut: Creates a shortcut for Linux developers to ensure deep linking works
CLI options
Some useful CLI options the desktop app uses are shown below. You can also display these options by running: npm run start help.
--version, -v: Prints the application version
--dataDir, -d: Set the path to where user data is stored
--disableDevMode, -p: Disable development mode to allow for testing as if it was Production
Environment variables
Some common environment variables that are used include:
NODE_ENV: Defines the Node environmentPRODUCTION: Used for Production modeDEVELOPMENT: Development modeTEST: Used when running automated tests
MM_DEBUG_MODALS: Used for debugging modals, set to1to show Developer Tools when a modal is opened