Skip to content

Support named parameters in the build script#4

Merged
jdevera merged 4 commits into
mainfrom
port-build-script-options
May 17, 2026
Merged

Support named parameters in the build script#4
jdevera merged 4 commits into
mainfrom
port-build-script-options

Conversation

@jdevera
Copy link
Copy Markdown
Owner

@jdevera jdevera commented May 17, 2026

Summary

Port of upstream PR criteo#192 onto the fork's main.

Four commits (the original branch's merge-with-upstream commit was skipped — its content is already in main):

  • Enhance build script with named flags, build number option, and legacy supportbuild.sh rewritten to take -v/-n/-l/-o/-b/-r/-d/-h flags while preserving the legacy positional invocation.
  • Fix markdown lint: add blank lines before fenced code blocks — doc cleanup the linter required.
  • Accept legacy --resign as positional arg for backwards compat — keeps the old ./build.sh VERSION NAME LONG_NAME --resign form working.
  • Fix Windows CI: add shell: bash to Build stepbuild.sh is a POSIX shell script; the Build step needed shell: bash so Windows runners invoke Git Bash.

CI workflow's Build step now uses ./build.sh -v ... -b ${{github.run_number}} -n cdt -l "Criteo Dev Toolkit" -o ... instead of inline go build, which gives stable build numbers tied to the GitHub run.

Conflicts resolved during cherry-pick:

  • README.md and build.sh: took the PR's complete versions (the PR rewrote the build script substantially; the legacy positional form is still honored at runtime).
  • .github/workflows/go.yml: auto-merged cleanly (PR Support named parameters in the build script criteo/command-launcher#192's shell: bash + new build-script invocation slotted in alongside our action-version bumps).

The original branch build_script_options (which still backs PR criteo#192 upstream) is untouched.

Test plan

  • go vet ./... clean locally
  • go test ./... passes locally
  • ./test/integration.sh 18/18 suites pass locally
  • ./build.sh -v test-port -n testapp -l "Test App" produces a working binary
  • CI passes on Linux/Windows/macOS (the shell: bash fix should make Windows happy)

jdevera added 4 commits May 17, 2026 16:05
…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 jdevera merged commit ba193f9 into main May 17, 2026
16 checks passed
@jdevera jdevera deleted the port-build-script-options branch May 17, 2026 15:11
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