{"id":17882241,"url":"https://github.com/mackee/go-mk-jetpack","last_synced_at":"2026-01-15T22:28:16.307Z","repository":{"id":145129020,"uuid":"124639719","full_name":"mackee/go-mk-jetpack","owner":"mackee","description":"The Makefile template for CLI Tool written in Golang.","archived":false,"fork":false,"pushed_at":"2019-10-17T02:57:01.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T12:52:54.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mackee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-10T09:10:20.000Z","updated_at":"2020-12-15T04:04:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"3da66214-4ddf-4753-b1c9-8297fa1d4dda","html_url":"https://github.com/mackee/go-mk-jetpack","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/mackee%2Fgo-mk-jetpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-mk-jetpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-mk-jetpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-mk-jetpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackee","download_url":"https://codeload.github.com/mackee/go-mk-jetpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922246,"owners_count":20855345,"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":[],"created_at":"2024-10-28T12:49:02.047Z","updated_at":"2026-01-15T22:28:16.280Z","avatar_url":"https://github.com/mackee.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-mk-jetpack\n\nThe Makefile template for CLI Tool written in Golang.\n\n## Requirements\n\n- `make`\n- [ghg](https://github.com/Songmu/ghg) - Get the executable from github releases easily\n\nThis makefile get build and packages tools by ghg.\n\nInstalling ghg is in Mac with brew:\n\n```console\n$ brew install Songmu/tap/ghg\n```\n\nPlease look a [ghg pages](https://github.com/Songmu/ghg) when installation for other environment.\n\nHowever requirement other tools. But you can use automatically install with ghg.\n\nAfter the makefile settings, type this:\n```console\n$ make get-tools\n```\n\nThis command install tools that are:\n\n- [dep](https://github.com/golang/dep) - Go dependency management tool\n- [goxz](https://github.com/Songmu/goxz) - Just do cross building and archiving go tools conventionally\n- [ghr](https://github.com/tcnksm/ghr) - Upload multiple artifacts to GitHub Release in parallel\n\n## Usage\n\n### 1. Installation `jetpack.mk` to your tools directory.\n\nThis example use `git submodule`.\n\n```console\n$ cd $GOPATH/src/github.com/yourname/yourtool\n$ git submodule add https://github.com/mackee/go-mk-jetpack _jetpack \n```\n\n### 2. Create a `Makefile`.\n\nIn your tool directory root, create a `Makefile` by your favorite editor.\n\n```console\n$ $EDITOR Makefile\n```\n\nAnd specify environment variable, include `jetpack.mk`.\n\n```make\nCMD_NAME     = yourtool\nCMD_PATH     = ./cmd/mytool\nPACKAGE_PATH = github.co/yourname/yourtool\n\ninclude ./_jetpack/jetpack.mk\n```\n\n### 3. Installation tools for `jetpack.mk`.\n\nThis step easy. You type this:\n\n```console\n$ make init\n```\n\n### 4. test, build, release!\n\nIf you want to run test, type this:\n\n```console\n$ make test\n```\n\nIf you want to build tool, type this:\n\n```console\n$ make build\n```\n\nWell, let's release binary to `github.com`.\n\nFirst, bump up tag version.\n\n```console\n$ git tag v0.0.1\n$ git push origin v0.0.1\n```\n\nYou can make a release packages for tools.\n\n```console\n$ make packages\n```\n\nThis process is build for cross-platform and packaging to zip file. Package files create to a `_artifacts` directory.\n\nLet's release!\n\n```console\n$ GITHUB_TOKEN=xxxxxx make release\n```\n\n`GITHUB_TOKEN` is github api token. I recommend configuration using at [direnv](https://github.com/direnv/direnv).\n\nYou will do this to open the page.\n\n```console\n$ make open-release\n```\n\n## Recommend settings\n\nThe `go-mk-jetpack` is create to packages at `_artifacts` and create a binary at `_bin`.\n\nSo this directory is ignore of git.\n\nIn `.gitignore`:\n\n```\n_artifacts\n_bin\n```\n\nAlso When try your tool at development, binary at `_bin/yourtool`. If you need set `_bin` to `$PATH`, you will use [direnv](https://github.com/direnv/direnv) and specify this at `.envrc` to can run your tool.\n\n```\nexport PATH=$GOPATH/src/$PACKAGE_PATH/_bin:$PATH\n```\n\n## Licence\n\n[MIT](https://github.com/tcnksm/tool/blob/master/LICENCE)\n\n## Author\n\n[mackee](https://github.com/mackee)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fgo-mk-jetpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackee%2Fgo-mk-jetpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fgo-mk-jetpack/lists"}