Skip to content

Support named parameters in the build script#192

Open
jdevera wants to merge 5 commits intocriteo:mainfrom
jdevera:build_script_options
Open

Support named parameters in the build script#192
jdevera wants to merge 5 commits intocriteo:mainfrom
jdevera:build_script_options

Conversation

@jdevera
Copy link
Copy Markdown
Contributor

@jdevera jdevera commented Feb 18, 2026

Summary

I wanted to be able to run the build script and just modify some of the parameters without having to follow the exact order of the positional arguments. I ended up keeping my own script and thought this could be a good addition to upstream.

Changes:

  • Add named flags: -v/--version, -n/--name, -l/--long-name, -o/--output, -b/--build-number
  • Add -b/--build-number flag so CI can pass github.run_number for stable build numbers instead of timestamps
  • Incorporate upstream's --resign macOS code-signing feature as -r/--resign
  • The legacy positional call format (./build.sh VERSION NAME LONG_NAME [--resign]) is preserved
  • Update CI workflow to use build.sh with the new flags
  • Update docs (README, introduction, build-from-source) with new usage

I ran these tests:

  • All flag combinations (-v, -n, -l, -o, -b, -r, -d, -h)
  • Legacy positional argument mode (1, 2, and 3 args)
  • Legacy --resign as 4th positional arg
  • Error cases (unknown flags, too many positional args, missing values)
  • Verified embedded values in built binary (myapp version 1.2.3, build 99)
  • Verified --resign triggers codesign on macOS (replaces linker signature with ad-hoc codesign)

…y support

Replace the positional-only build script with a flag-based CLI:
- Named flags: -v/--version, -n/--name, -l/--long-name, -o/--output
- New -b/--build-number flag for stable CI build numbers (github.run_number)
- Legacy positional args (VERSION NAME LONG_NAME) still work for muscle memory
- Debug mode (-d), help (-h), and input validation
- Update CI workflow to use build.sh with -b for stable build numbers
- Update docs (README, introduction, build-from-source) with new usage
@jdevera
Copy link
Copy Markdown
Contributor Author

jdevera commented Mar 15, 2026

I've merge the recent changes, fixed the CI issue, and integrated the new --resign flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant