{"id":19680681,"url":"https://github.com/gvcgo/gobuilder","last_synced_at":"2025-04-29T04:31:37.245Z","repository":{"id":232823534,"uuid":"785194073","full_name":"gvcgo/gobuilder","owner":"gvcgo","description":"An enhancement for official \u003cgo build\u003e.","archived":false,"fork":false,"pushed_at":"2024-06-15T04:17:38.000Z","size":47,"stargazers_count":53,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T13:05:57.463Z","etag":null,"topics":["build","cgo","cross-compilation","cross-compile","cross-platform","garble","go","golang","osslsigncode","pack","script-free","upx","xgo","zip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvcgo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2024-04-11T11:46:55.000Z","updated_at":"2025-03-14T07:27:44.000Z","dependencies_parsed_at":"2024-04-11T17:25:49.917Z","dependency_job_id":"f9008a02-fea1-45c2-aafc-a4c43b0af27c","html_url":"https://github.com/gvcgo/gobuilder","commit_stats":null,"previous_names":["gvcgo/gobuilder"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvcgo%2Fgobuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvcgo%2Fgobuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvcgo%2Fgobuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvcgo%2Fgobuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvcgo","download_url":"https://codeload.github.com/gvcgo/gobuilder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251432848,"owners_count":21588665,"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","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","cgo","cross-compilation","cross-compile","cross-platform","garble","go","golang","osslsigncode","pack","script-free","upx","xgo","zip"],"created_at":"2024-11-11T18:05:44.906Z","updated_at":"2025-04-29T04:31:37.011Z","avatar_url":"https://github.com/gvcgo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[中文](https://github.com/gvcgo/gobuilder/blob/main/docs/README_CN.md) | [En](https://github.com/gvcgo/gobuilder)\n### What's gobuilder?\n\nGobuilder is a tool for building Go binaries. It is similar to the Go tool, but it supports building multiple binaries at once and supports custom build configurations without creating any script.\n\n### Features\n\n- Builds binaries for any platform from go source code.\n- Cross-compilation for CGO using **xgo**. (optional)\n- Packs binaries with **UPX**. (optional)\n- Obfuscate binaries with **garble** for windows. (optional)\n- Sign windows exe with **osslsigncode**. (optional)\n- Zip binaries automatically.\n- Builds binaries at anywhere in a go project.\n- Remembers the build operations forever.\n- No script is needed.\n- Keep source code tidy. A dir named **build** is created, all the related files are restored in **build**. \n\n**Note**: You can install **upx** and **go compiler** using [VMR](https://github.com/gvcgo/version-manager). **osslsigncode** needs manuall compilation. **garble** and **xgo** can be installed using **go install xxx**.\n**xgo docker image** is available at **ghcr.io/crazy-max/xgo** or **crazymax/xgo**.\n\nFor self-signed certificate for Windows, see [here](https://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows). \n\n```bash\nNew-SelfSignedCertificate -Type Custom -Subject \"CN=\u003cname\u003e, O=\u003ccompany name\u003e, C=CN, L=\u003clocation\u003e, S=\u003clocation\u003e\" -KeyUsage DigitalSignature -FriendlyName \"MailTool\" -CertStoreLocation \"Cert:\\CurrentUser\\My\" -TextExtension @(\"2.5.29.37={text}1.3.6.1.5.5.7.3.3\", \"2.5.29.19={text}\") -NotAfter (Get-Date).AddYears(10)\n```\n\n### How to use?\n\n- Install\n\n```bash\ngo install github.com/gvcgo/gobuilder/cmd/gber@v0.1.5\n```\n\n- Usage\n\n```bash\ngber build \u003cyour-go-build-flags-and-args\u003e\n```\n\n**Note**: If you need to inject variables when building go source code, \"$\" should be replaced with \"#\".\n```bash\n# original\ngber build -ldflags \"-X main.GitTag=$(git describe --abbrev=0 --tags) -X main.GitHash=$(git show -s --format=%H)  -s -w\" ./cmd/vmr/\n\n# replaced\ngber build -ldflags \"-X main.GitTag=#(git describe --abbrev=0 --tags) -X main.GitHash=#(git show -s --format=%H)  -s -w\" ./cmd/vmr\n```\n\n### Demo\n\ncompiling [vmr](https://github.com/gvcgo/version-manager) for different platforms and architectures.\n\n![vmr_compilation](https://cdn.jsdelivr.net/gh/moqsien/conf_backup@main/gber.gif)\n\n### Dependencies\n\n- [go compiler](https://go.dev/dl/) (required)\n- [garble](https://github.com/burrowers/garble) (optional)\n- [osslsigncode](https://github.com/mtrojnar/osslsigncode) (optional)\n- [upx](https://github.com/upx/upx) (optional)\n- [xgo](https://github.com/crazy-max/xgo) (optional)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvcgo%2Fgobuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvcgo%2Fgobuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvcgo%2Fgobuilder/lists"}