pdulvp.fr

prel build, and releaseBuildCommand as the key it is now has been fixed.

See more details at : https://github.com/pdulvp/prel/issues/9

  • buildCommand is renamed releaseBuildCommand: it is read by the release

and by nothing else, and the name now says which build it configures

  • a config still setting buildCommand is warned about by name, with the name

to rename it to - the generic unknown-key warning would let a release go out
with no build at all

  • new prel build: the command releaseBuildCommand names, run on its own

from the repository root with $version and $tag, so a build gets tried
before a release depends on it - no commit, no tag, no push, and the build's
own exit status

  • _prel_build_eval in scripts/build.sh is the one place a build command is

expanded; the build step of prel release goes through it

  • prel config widens its label column to fit the longer key

buildCommand becomes releaseBuildCommand

<sub>2026-10-22-1620-release-build-command.md — 2026-10-22 16:20</sub>

Goal

The prel.config.json key buildCommand is read by prel release and by
nothing else. The name says a build; the key is about one build in particular,
the one that makes the files a release carries. Rename it
releaseBuildCommand, so a repository's config says which build it is
configuring.

{
  "releaseBuildCommand": "packaging/build-deb.sh ${version}",
  "artifacts": ["build/prel_${version}_all.deb"]
}

Decisions

  • The key alone is renamed. The internal reader _rel_build_command and the

$build_command local keep their names: they already live in release.sh,
where every name is about a release.

  • An old buildCommand is named rather than caught by the generic unknown

key warning: the generic one says "prel does not read this" and lets the
release run with no build, which is the quiet failure the config check
exists to prevent. Same treatment as the stale prel.* git config keys -
warned about, with the new name to move it to, never obeyed.

  • _PREL_CONFIG_GIT_KEYS keeps prel.buildCommand: that is the name the git

config key actually had, and the warning tells the reader where it went -
now to releaseBuildCommand rather than to its own name.

  • prel config widens its value column from 13 to 20 - releaseBuildCommand:

is 20 characters, and the five labels stay in one column.

Steps

  • [x] scripts/config.sh: the key in _PREL_CONFIG_KEYS, a renamed-keys

warning in _prel_config_check, the git-key warning pointing at the new
name, the %-13s widths, and the config usage text

  • [x] scripts/release.sh: _rel_build_command over the new key, the

release usage text, the dry-run line

  • [x] prel.config.json: this repository's own key
  • [x] packaging/build-deb.sh: the usage comment that still says

prel.buildCommand

  • [x] README.md: the configuring section and its table, the prel config

sample output, the release-artifacts section, the .deb section, the
configuration-files list

  • [x] test: prel config on the new key, on a config still holding

buildCommand, and with a prel.buildCommand git config key set

  • [x] test: prel release 0.2.4 -n shows the build line; `prel release

artifacts` still resolves

  • [x] mark complete; write docs/plans/sumup.md per the plan-summary skill;

archive this file

prel build: the release build, run on its own

<sub>2026-10-22-1845-prel-build.md — 2026-10-22 19:10</sub>

Goal

releaseBuildCommand can only be run by prel release, which tags and pushes
around it. A project setting it has no way to try it: the first time the
command runs is the release, and a build that fails there undoes a commit and
a tag to get back. prel build runs that command and nothing else - same
directory, same $version and $tag, no commit, no tag, no push.

$ prel build
build:     packaging/build-deb.sh ${version}
version:   0.2.3 (from VERSION)
tag:       v0.2.3
...
prel build: the build succeeded

Decisions

  • scripts/build.sh, the function build - prel.sh turns every

scripts/*.sh into a command, and the whole file name is the command, so no
shortcut alias is needed.

  • The version comes from versionFile as it reads now, or from an argument:

prel build 1.0.1, the same shape prel release artifacts takes. No
version to be had is an error naming the argument, not a build run with an
empty ${version} - the one in prel's own config would call
build-deb.sh with no version at all.

  • The build sees $version and $tag as shell variables, which is what

"packaging/build-deb.sh ${version}" relies on, and runs from the
repository root. That contract is documented, so it gets one
implementation: _prel_build_eval in build.sh, which release.sh calls
in place of its own cd-and-eval subshell.

  • The exit status is the build's own, so a script can gate on it. With

artifacts set, what the patterns match is printed after a build that
worked - as a report, not a verdict: prel release artifacts is the command
that exits non-zero over a pattern matching nothing, and is named here.

  • -n/--dry-run prints the command, the version and the tag and runs

nothing, as prel release -n does.

  • No releaseBuildCommand set is not an error: nothing to build is the

ordinary case for most projects, said plainly with the key to set, and
exits 0.

Found on the way

  • The build step of prel release relied on $version and $tag being

locals of the function the eval sat in. _prel_build_eval takes the two
as arguments and declares them itself, so what a build command can read is
stated where it is run rather than inherited from whoever calls it.

Steps

  • [x] scripts/build.sh: _prel_build_eval, _prel_build_version and the

build command with its usage

  • [x] scripts/release.sh: the build step over _prel_build_eval; source

build.sh in the direct-run block as it does config.sh

  • [x] README.md: a ### prel build section before ### prel release, the

release-artifacts section pointing at it, and the direct-script list

  • [x] test: prel build in this repository (builds the .deb), -n, an

explicit version, a bad version, a repository with no
releaseBuildCommand, one with no version file, a build command that
fails, and prel build usage

  • [x] test: prel release 0.2.4 -n and a real prel release build step still

behave - release.sh run directly as well, where it loads build.sh
itself

  • [x] mark complete; write docs/plans/sumup.md per the plan-summary skill;

archive this file

<sub>Filed by prel from the completed plans at commit time.</sub>