taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

README.md (2769B)


      1 # Local workspace tools
      2 
      3 `taler-repos` updates, builds, installs, tags, reports versions, and runs commands
      4 across the local Taler stack. It is a standalone Python script using only the
      5 standard library; it can be copied elsewhere and does not read deployment
      6 configuration files.
      7 
      8 Run it from the directory containing the component repositories, or pass
      9 `--root` before the command:
     10 
     11 ```sh
     12 ./taler-deployment/tools/taler-repos versions
     13 ./taler-deployment/tools/taler-repos build
     14 ./taler-deployment/tools/taler-repos bump --dry-run
     15 ./taler-deployment/tools/taler-repos bump --dev --dry-run
     16 ./taler-deployment/tools/taler-repos foreach git status --short
     17 /path/to/taler-repos --root ~/taler versions
     18 ```
     19 
     20 `foreach PROGRAM [ARG ...]` runs the given program and arguments sequentially
     21 in each repository from the script's embedded `REPOSITORIES` list, in list
     22 order. Each repository is the command's working directory. All repository
     23 paths are validated before any command runs; dirty worktrees and repositories
     24 without upstream branches are allowed. The repository and command are printed
     25 before each invocation, which inherits standard input, output, and error.
     26 The first command failure stops execution and makes `taler-repos` exit with
     27 status 1.
     28 
     29 Arguments are passed directly to the program. An optional `--` may precede
     30 the program. For pipelines, redirection, or other shell expressions, invoke a
     31 shell explicitly:
     32 
     33 ```sh
     34 /path/to/taler-repos --root ~/taler foreach -- sh -c 'pwd && git status --short'
     35 ```
     36 
     37 `build` requires clean worktrees with upstream branches, pulls all components
     38 with `--ff-only`, then runs bootstrap, configure, make, and make install in
     39 dependency order. The installation prefix is `~/local`. Dependencies are
     40 embedded in `BUILD_DEPENDENCIES`, based on `packaging/ng/packages.toml`; update
     41 the map when component dependencies change. External dependencies, such as
     42 libmicrohttpd, must already be installed.
     43 
     44 `bump` creates lightweight local tags on each component's HEAD. Both modes
     45 skip HEADs with any `v*` tag. Untagged components must have clean worktrees and
     46 an existing local `vX.Y.Z` or `vX.Y.Z-dev.N` tag. The highest supported version
     47 across all local branches determines the next version:
     48 
     49 | Highest version | `bump` | `bump --dev` |
     50 | --- | --- | --- |
     51 | `v1.2.3` | `v1.2.4` | `v1.2.4-dev.1` |
     52 | `v1.2.4-dev.4` | `v1.2.4` | `v1.2.4-dev.5` |
     53 
     54 All components are validated before any tags are created. `--dry-run` shows
     55 the proposed tags without creating them. Bumping does not fetch, pull, push,
     56 or edit version files. If tag creation fails, the command stops and reports
     57 any tags it already created.
     58 
     59 Run the tests from the deployment repository root with Python 3.11 or newer:
     60 
     61 ```sh
     62 python3 -m unittest discover -s tools -v
     63 ```