Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

ProbeConfig Explanation

Konstantin Zhigaylo edited this page Aug 1, 2022 · 7 revisions

This guide will teach you mastery of ProbeConfig.

What is ProbeConfig?

ProbeConfig - configuration files format specially developed for zeroProbe configurations. Syntax similar to INI configurations. ProbeConfig doesn't support variables initialization. Internal interpreter in zeroProbe read's these configurations.

Syntax

Lines have command and arguments divided by double dots operator (:). ProbeConfig has 2 types of commands:

  • & - commands that's interact with zeroProbe internal run configuration. It's named internal commands.
  • ! - assign command to stage that's defined by &stages command.

If visualize it, that looks like this:

&command: argument

Internal commands

zeroProbe has internal commands to tell them what to do. This list will increase with every added internal command. By the way, you can't make commands. Currently, zeroProbe interpreter doesn't support it.

zeroProbe's built-in internal commands:

  • &project - assign name for project.
  • &checkfor - creates list of components that must be checked before running.
  • &shell - sets shell commands that will be executed before stages. Can be called many times.
  • &stage - base function. Tells zeroProbe list of possible stages. In the future, you can't edit this list.
  • &iferror - execute command if error occur while trying to run current configuration.

Small example of it usage to build C++ applications:

&project: Build File Lister
&checkfor: g++ gcc
&shell: echo "Starting build..."
&stages: build, test
&iferror: rm -rf file_lister

!build: g++ main.cpp src/io.cpp src/io.h src/fs.cpp src/fs.h -o file_lister
!test: ./file_lister

Assign stages command

How you might read from text above, zeroProbe also have stage assign operator(!). To assign a command to a stage you need to start the line with !, then enter name of stage and after double dots (:) enter command to execute. Example:

!stage: command

Final

ProbeConfig are not too hard. Also, it will gain new features and commands in future updates. Or, tell your idea for a new feature!

Clone this wiki locally