{"id":20331144,"url":"https://github.com/comcast/tsb","last_synced_at":"2025-11-07T11:04:22.243Z","repository":{"id":70958022,"uuid":"138740771","full_name":"Comcast/tsb","owner":"Comcast","description":"A Transitive Source Builder for managing builds across multiple repositories","archived":false,"fork":false,"pushed_at":"2022-11-15T15:43:53.000Z","size":278,"stargazers_count":11,"open_issues_count":6,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-21T01:39:04.622Z","etag":null,"topics":["build-automation","build-tool","source-control"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Comcast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-26T13:17:37.000Z","updated_at":"2024-06-20T18:49:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"91b1785f-85ee-4d37-b2c0-89e1d02b9485","html_url":"https://github.com/Comcast/tsb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Comcast/tsb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ftsb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ftsb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ftsb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ftsb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comcast","download_url":"https://codeload.github.com/Comcast/tsb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ftsb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281748717,"owners_count":26554822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-automation","build-tool","source-control"],"created_at":"2024-11-14T20:18:56.160Z","updated_at":"2025-10-30T05:04:28.152Z","avatar_url":"https://github.com/Comcast.png","language":"Go","readme":"tsb\n===\n\n`tsb` is the Transitive Source Builder.\n\nIt is designed to allow organizations, teams, and individuals to manage\ntheir builds of systems that may be shared with others.\n\nThere is a [quickstart guide](docs/init.md) to getting going with `tsb` as well\nas a [strategy guide](docs/theory.md) for managing downstream repositories in\ngeneral.\n\nUsage: `tsb [options] [commands]`\n\nCommands\n--------\n  - `tsb fetch` acquires all the repositories for `/src/`.\n  - `tsb build` builds the build branch, with patches applied.\n  - `tsb prebuild` sets up the source repositories and performs all patching up\n    to the point of building, but does not perform a build. After this step,\n    running the services in `docker-compose.yml` with docker should produce the\n    build artefacts.\n  - `tsb update` fetches the latest updates and creates a new commit in\n    the config repository. This will also fetch the latest updates in the\n    subscribed branches and update the patch file's subscriptions.\n  - `tsb cherry {hash}` cherry-picks `{hash}` and adds it to the patch\n    file.\n  - `tsb subscribe {branch}` subscribes to the given branch. The branch must\n    be in the form `{repoName}:{branchName}`. The branch name must specify\n    the name of the remote that the subscription should be pulled from\n    (`remoteName/branchName`).\n    The subscription is then added to the patch file.\n  - `tsb ls-cherry` lists out the current list of cherry-picks, along\n    with some basic information about them to help identify them.\n  - `tsb verbose` and `tsb quiet` do nothing on their own, but set the\n    output to be verbose and quiet, respectively. `-v` and `-q` are\n    synonyms.\n  - `tsb cd {dir}` does the same as `tsb {dir}`, except that it always\n    cds, even if {dir} matches the name of a command.\n  - `tsb at {rev}` causes commands that follow to pull data from that\n    revision in source control. This functionality requires that the\n    `tsb` directory be a git repository.\n  - `tsb {dir}` changes directory into `{dir}`. This is useful for\n    running `tsb` against a subdirectory.\n  - `tsb changelog {old hash}` generates a changelog between `old hash`\n    and HEAD of tsb.  If not provided, `old hash` is the previous\n    tsb commit\n  - `tsb diff {old hash}` generates a detailed changelog between\n    `old hash` and HEAD of tsb.  If not provided, `old hash` is the\n    previous tsb commit\n\nConfig Repository\n-----------------\n\n`tsb` operates on a repository, not just a config file. The repository\nshould have three `.yml` files at the root:\n\n    /docker-compose.yml\n    /patches.yml\n    /repos.yml\n\nDuring builds, the source for each repository will be checked out to:\n\n    /src/{reponame}\n\nwhere `{reponame}` is the name of that repository in the repos file. The\n`docker-compose.yml` file will need to refer to these repositories or\ntheir contents by this path.\n\nBuilds will be expected to produce a list of artefacts in:\n\n    /dist/\n\nThe repository will require additional files to support those files\n\n### docker-compose.yml\n\nThe compose file may define any number of targets with any names, they\nwill all be run as part of the build process. One or more dockerfiles\nmay be referenced from here.\n\nSource repositories will be in predictable locations as noted above\n(`/src/{reponame}`), so they can and should be mounted as volumes in the\ncontainer. Build tasks should generally not modify the volumes directly,\nbut rather copy them to a working directory if they might be modified\nby build tools.\n\nLikewise, `/dist/` should generally be mounted so that output files can\nbe put there.\n\n#### Dockerfile\n\nThe dockerfile (referenced by the docker-compose.yml) should define the\nbuild environment. Generally, it should add a script that serves as the\nentrypoint for the build. It should not run the build directly via `RUN`\ninstructions, since build states may be cached by docker.\n\nThe run script should copy artefacts and log files to the location in\nthe container where `/dist/` is mounted and return 0 iff the build was\nsuccessful.\n\n### patches.yml\n\n`patches.yml` is a YAML 1.2 file. It should be a list of whose members are hashes\nor branch subscriptions:\n\n    superwidget:\n      changesets:\n      - {changeset1}\n      - branch: beta\n        changesets:\n          - {changesetA}\n          - {changesetB}\n      - {changeset2}\n\nThe hashes can refer to any changeset in any of the referenced sources.\nEach changeset will be cherry-picked, in order, to the head of the branch\nto be built.\n\nThe `patches.yml` file can be empty. Indeed, empty is the most desirable\nstate, since that means building directly against the primary\nrepository.\n\nThis file will not usually need to be modified manually. The `tsb cherry`,\n`tsb subscribe` and `tsb update` commands will safely modify this file.\n\n### repos.yml\n\n`repos.yml` is a YAML 1.2 file. It should be an object with a member for\neach repository:\n\n    superwidget:\n      src: https://upstream.example.net/repos/superwidget\n      branch: master\n      head: 4817590950ca0b52d3336011a1abdbb6f906e23228c5857cc0f7703828f6966f\n      extra:\n        - https://private.example.com/repos/superwidget-alpha\n        - path: https://private.example.com/repos/superwidget-beta\n          name: beta\n    hyperwidget:\n      src: https://upstream.example.net/repos/hyperwidget\n      branch: lts-7.2\n\nEach repository member object should have:\n  - a `src` member, which provides the address whence to fetch the\n    source repository;\n  - a `branch` member, which defines the branch being tracked for\n    builds;\n  - a `head` member, which is an explicit changeset hash to build; and\n  - an optional `extra` member, which is a list of extra source\n    addresses that should be fetched in addition to the primary `src`.\n    These list members can either be a string representation of the path\n    or an object containing a `name` and a `path`. If a name is provided,\n    the remote will be given that name when added.\n\nWhen building, `branch` is ignored; `head` controls. `branch` is used to\nupdate `head` with `tsb update`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Ftsb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomcast%2Ftsb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Ftsb/lists"}