{"id":13647826,"url":"https://github.com/arp242/gogo-release","last_synced_at":"2025-10-17T07:24:43.663Z","repository":{"id":117654694,"uuid":"226513629","full_name":"arp242/gogo-release","owner":"arp242","description":"Build cross-platform binaries for Go","archived":false,"fork":false,"pushed_at":"2022-04-03T16:48:26.000Z","size":23,"stargazers_count":32,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T15:43:22.988Z","etag":null,"topics":["go"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/arp242.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2019-12-07T13:00:05.000Z","updated_at":"2024-04-11T22:13:00.000Z","dependencies_parsed_at":"2024-01-14T10:16:19.527Z","dependency_job_id":"d5e591b7-87ea-46cb-90d7-52042fdfaa67","html_url":"https://github.com/arp242/gogo-release","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arp242%2Fgogo-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arp242%2Fgogo-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arp242%2Fgogo-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arp242%2Fgogo-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arp242","download_url":"https://codeload.github.com/arp242/gogo-release/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244207736,"owners_count":20416107,"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":["go"],"created_at":"2024-08-02T01:03:47.645Z","updated_at":"2025-10-17T07:24:38.422Z","avatar_url":"https://github.com/arp242.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"gogo-release is a simple POSIX shell script to:\n\n1. Cross-compile binaries to various different targets.\n2. Optionally compress the binaries.\n\nIt's the simpler and unix-beardy brother of [go-releaser][gor].\n\nConfigure it by just editing the source or adding a `.gogo-release` file; this\nis simply a shell script that's sourced and can be used to set/override some\nvariables. [Here is an example][ex]. See the `gogo-release` script for a list of\nthings you can set with documentation.\n\nUsage:\n\n1. *[Mad coding]*.\n2. Hide yo wife, hide yo kids, commit yo code.\n3. Create a new tag.\n4. `gogo-release`\n5. Create new GitHub release, upload contents of `dist`.\n6. Have a celebratory beer, release party, drug binge, orgy, Satanic sacrifice.\n\nNotes:\n\n1. The current commit must have a tag, so if you want to build v1.2.0:\n\n       $ git checkout v1.2.0\n       $ gogo-release\n\n   You can also add a version as a commandline argument; this will only put the\n   version in the name, and *won't* check out the git commit:\n\n       $ gogo-release v1.2.0\n\n   This is mostly intended for testing.\n\n2. Cross-compiling code that uses cgo is tricky as cross-compiling C code is\n   tricky; I wrote a bit more about that over here: [Statically compiling Go\n   programs][static]. In brief:\n\n   1. Make sure you have the required C compiler cross-build tools installed;\n      you can usually install these from your distro's package manger (names\n      vary; searching for `-linux-` should work).\n   2. Make sure `CGO_ENABLED=1` is set, e.g. by adding `export CGO_ENABLED=1` to\n      `.gogo-release`.\n   3. Make sure the right compiler is used by adding `CC=..` to the build\n      matrix.\n   4. You probably want to add `-ldflags='-extldflags=-static'` to create\n      statically linked binaries. Otherwise, make sure to use an older libc\n      version for best compatability.\n\n   An alternative might be [xgo][xgo], which may be a bit easier to\n   cross-compile cgo code depending on what you want and personal preferences.\n\n3. Define a `gogo_before_exit` function in your `.gogo-release` to run something\n   after everything is done. Just add the lines to the script if you want to run\n   something before the building starts; for example:\n\n       start=$(date +%s)\n       gogo_before_exit() {\n           echo \"Took $(( $(date +%s) - $start )) seconds\"\n           ls -lh \"$tmp\" | awk '{print $5 \" \" $9}'\n       }\n\n4. A previous version also included code for automatically creating a GitHub\n   release and uploading it. I later removed this as I felt it was a bit too\n   complex and *automagic*. Uploading is just a few clicks anyway, so it doesn't\n   really save that much effort (I got carried away). [You can still add it in\n   `gogo_before_exit` if you want][gh].\n\n\n[ex]: https://github.com/zgoat/goatcounter/blob/master/.gogo-release\n[gh]: https://github.com/arp242/gogo-release/blob/5a2de679869746331b63f942dd381334f50d3dd3/gogo-release#L70\n[gor]: https://github.com/goreleaser/goreleaser\n[xgo]: https://github.com/karalabe/xgo\n[sqlite]: https://github.com/mattn/go-sqlite3/issues/384\n[static]: http://arp242.net/static-go.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farp242%2Fgogo-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farp242%2Fgogo-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farp242%2Fgogo-release/lists"}