mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 14:08:30 +00:00
1.4 KiB
1.4 KiB
dcr run
Builds the project and runs the resulting binary.
Usage
dcr run
dcr run --debug
dcr run --release
dcr run --target linux --release
dcr run --release --force
dcr run --debug --clean
Behavior
- Validates
dcr.toml. - Reads
package.name,build.kind, and optionalbuild.target. - Runs the same build flow as
dcr build. - Executes the built artifact path for the selected profile.
- If
[run].cmdis set, runs that command instead of the built binary.
Restrictions
- If
build.kind(orbuild.{profile}.kind) is"staticlib","sharedlib","efi", or"elf",runexits with error. - The profile is selected from the first argument.
--target <triple>runs the binary for specified target (short names:linux,macos,windows,freebsd,openbsd,netbsd).--forceskips build cache checks and recompiles.--cleanremovestarget/<profile>andbuild.cleanpaths before building.--workspace <name>filters build to a specific workspace member.
run.cmd variables
run.cmd supports the same variables as build steps: {profile}, {version}, {version_major},
{version_minor}, {version_patch}, {version_suffix}, {version_suffix_dash}.
The command runs via sh -c on Unix and cmd /C on Windows.
On build failure
dcr run attempts to launch an existing binary from the same profile if present; otherwise it reports that code errors must be fixed.