Description
Currently, the portal backend utilizes Task instead of build.sh. The build system should probably depend on the deployment direction
What is Task
Go-Task (or simply Task) is a modern, cross-platform task runner and build tool written in Go that uses YAML-based configuration files to simplify running terminal commands, similar to GNU Make.
Differences
It is required to migrate the portal backend’s Taskfile.yml workflow to a build.sh workflow for consistency with the consent server.
| Area |
Portal backend |
Consent server |
| Primary command |
cd portal/backend && task build |
From repo root: ./build.sh build [OS] [ARCH] |
| Underlying Go command |
go build -o bin/portal-backend[.exe] ./cmd/server |
GOOS=... GOARCH=... CGO_ENABLED=0 go build -ldflags ... -o ../target/server/consent-server ./cmd/server |
| Output |
portal/backend/bin/portal-backend |
target/server/consent-server |
| Cross-compilation |
Host OS only; adds .exe on Windows |
Explicit OS/architecture arguments |
| Runtime assets |
Binary only |
Copies config, startup script, DB scripts, API specs, README, and version |
Key decisions to be made
- Use a dedicated script for the portal backend or extend the root build.sh.
- Define the command interface, binary name, and output directory.
- Use a separate config YAML for the portal (commonly at portal root) or in portal-backend.
- Decide whether cross-compilation and distribution packaging are required.
- Decide how Windows developers will run the script. (For example, ThunderID maintains a PowerShell version for each script)
- Determine whether to retain Task temporarily as a compatibility wrapper.
- Decide which of the current commands (lint, fmt:check, test) to support in the new build.sh.
- Decide which commands to be automatically executed on build ((lint, fmt:check, test)
Affected Product Version:
Current feature/portal branch
OS, DB, other environment details and versions:
Go 1.26.x; Linux, macOS, and Windows through Git Bash or WSL.
Steps to reproduce:
- Run
task build from portal/backend.
- Compare it with
./build.sh build from the repository root.
- Observe that the two services use inconsistent build commands and artifact layouts.
Description
Currently, the portal backend utilizes Task instead of build.sh. The build system should probably depend on the deployment direction
What is Task
Go-Task (or simply Task) is a modern, cross-platform task runner and build tool written in Go that uses YAML-based configuration files to simplify running terminal commands, similar to GNU Make.
Differences
It is required to migrate the portal backend’s
Taskfile.ymlworkflow to abuild.shworkflow for consistency with the consent server.cd portal/backend && task build./build.sh build [OS] [ARCH]go build -o bin/portal-backend[.exe] ./cmd/serverGOOS=... GOARCH=... CGO_ENABLED=0 go build -ldflags ... -o ../target/server/consent-server ./cmd/serverportal/backend/bin/portal-backendtarget/server/consent-server.exeon WindowsKey decisions to be made
Affected Product Version:
Current
feature/portalbranchOS, DB, other environment details and versions:
Go 1.26.x; Linux, macOS, and Windows through Git Bash or WSL.
Steps to reproduce:
task buildfromportal/backend../build.sh buildfrom the repository root.