No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ansgarz 6352869e8c
All checks were successful
project_builder CI / build (push) Successful in 2m38s
chg release link
2026-07-19 17:40:41 +02:00
.forgejo/workflows release: 0.1.2 2026-02-15 22:28:56 +01:00
doc release: 0.1.2 2026-02-15 22:28:56 +01:00
src release: 0.1.2 2026-02-15 22:28:56 +01:00
tests release: 0.1.2 2026-02-15 22:28:56 +01:00
.gitignore release: 0.1.2 2026-02-15 22:28:56 +01:00
Cargo.lock chg release link 2026-07-19 17:40:41 +02:00
Cargo.toml release: 0.1.4-SNAPSHOT 2026-02-15 22:29:59 +01:00
publish.yaml release: 0.1.2 2026-02-15 22:28:56 +01:00
README.md chg release link 2026-07-19 17:40:41 +02:00

project_builder

Project build and publishing tool

Try

Download latest binary from https://repo.prod.meissa.de/meissa/project_builder/releases

Make it executable: chmod +x pb

Get help with:

./pb
# or 
./pb --help

Build

Binary

cargo build
# or
cargo build --release  # for the small release binary 

Deploy

cargo install --path .

Installs as ~/.cargo/bin/pb

Impression

Get an impression by running the following integration test:

cargo test test_publish_gitlab_release -- --nocapture

Resulting in output like:

=============== Start ===============
-> Execute session
---> Execute publish_gitlab_release
-----> Execute publish_gitlab_package_for_release
-------> Success curl -H "PRIVATE-TOKEN: mytoken" --upload-file target/release/asset "https://my.url/packages/generic/release-package/7.5.3/asset"
-----> Success publish_gitlab_package_for_release
-----> Success curl --header 'Content-Type: application/json' --data '{ "name": "Release 7.5.3", "tag_name": "7.5.3" , "assets": { "links": [{ "name": "asset", "url": "https://my.url/packages/generic/release-package/7.5.3/asset", "link_type": "other" }] } }' --request POST "https://my.url/releases" -H "PRIVATE-TOKEN: mytoken"
---> Success publish_gitlab_release
-> Success session
=============== End ================

Run

pb      # print help
pb tag  # show the latest git tag of this project

Cli

pb                       # without arguments => shows help
pb -h                    # shows help
pb tag -h                # shows help for command "tag"
pb publish-release -h    # shows help for command "publish-release"

Publishing

  • Publishing requires that a properly configured file "publish.yaml" active folder, see below
  • The specified environment variable for the token (e.g. CI_JOB_TOKEN) must be provided
    • in the gitlab pipeline the variable CI_JOB_TOKEN is set per default

Impression

Get an impression by running the following integration test:

cargo test test_publish_gitlab_release -- --nocapture

Resulting in output like:

=============== Start ===============
-> Execute session
---> Execute publish_gitlab_release
-----> Execute publish_gitlab_package_for_release
-------> Success curl -H "PRIVATE-TOKEN: mytoken" --upload-file target/release/asset "https://my.url/packages/generic/release-package/7.5.3/asset"
-----> Success publish_gitlab_package_for_release
-----> Success curl --header 'Content-Type: application/json' --data '{ "name": "Release 7.5.3", "tag_name": "7.5.3" , "assets": { "links": [{ "name": "asset", "url": "https://my.url/packages/generic/release-package/7.5.3/asset", "link_type": "other" }] } }' --request POST "https://my.url/releases" -H "PRIVATE-TOKEN: mytoken"
---> Success publish_gitlab_release
-> Success session
=============== End ================

publish.yaml

Example:

release:
  release_server_url: [the server api url to which the release is published]
  token_env_name: [token name]   # e.g. CI_JOB_TOKEN for within gitlab ci
  organisation: [org]            # the organisation under whish the repo/release resides
  release_artifacts:
    - [first asset]         # full local asset path, e.g. folder1/folder2/asset
    - [second asset]
    - ...
Run locally

Dry-run:

 CI_JOB_TOKEN=mytoken pb publish-release --mode dry-run

Live (don't forget to replace "")

 CI_JOB_TOKEN=<mytoken> pb publish-release --mode local

CI pipeline example

See build.yaml

Test

Normal tests (excluding domain tests):

cargo test

Domain tests

RUSTFLAGS="--cfg domaintest" cargo test domaintest