You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The organization of build scripts in hack/ has remained largely unchanged for a long time. This repo has undergone significant changes and the build scripts could use a refresh.
Goals
remove hack/make.sh so that scripts can be executed directly without a driver
keep a clear distinction between libraries (currently files prefixed with .) and "task scripts"
group the scripts by high level operation (build, test, release, etc)
remove hack/make.sh, and move everything out of hack/make to a new location under hack
any setup logic in hack/make.sh will move to a library under hack/lib or hack/<category>/lib
Structure:
hack
|--- ci # CI container entrypoints, one script per CI build (already exists)
|--- run # scripts for running the daemon (ex dind, hack/make/run)
|--- release # scripts for releasing new versions (ex: generate-authors.sh)
|--- build # scripts for building the binaries (hack/make/binary*, hack/make/cross)
`--- generate # generate code (generate-swagger-api.sh, hack/make/.go-autogen)
|--- test # scripts for running test suites (hack/test already exists)
|--- validate # scripts for validating code, linting, etc (already exists)
|--- deps # installing dependencies, (vendor.sh, and hack/dockerfile/)
|--- libs
Anything in libs should only define functions, nothing should run when sourced. Each directory can also have a libs directory for anything that is not general enough to be at the top level
(hack/integration-cli-on-swarm/ could be moved back to contrib/ since it's mostly go code, or would be under hack/test/integration-cli-on-swarm/)
Problem Statement
The organization of build scripts in
hack/has remained largely unchanged for a long time. This repo has undergone significant changes and the build scripts could use a refresh.Goals
hack/make.shso that scripts can be executed directly without a driver.) and "task scripts"Proposal
hack/make.sh, and move everything out ofhack/maketo a new location underhackhack/make.shwill move to a library underhack/liborhack/<category>/libStructure:
Anything in
libsshould only define functions, nothing should run when sourced. Each directory can also have alibsdirectory for anything that is not general enough to be at the top level(
hack/integration-cli-on-swarm/could be moved back tocontrib/since it's mostly go code, or would be underhack/test/integration-cli-on-swarm/)