{"id":14156315,"url":"https://github.com/sheldonhull/magetools","last_synced_at":"2025-03-22T18:32:47.649Z","repository":{"id":39758517,"uuid":"390154267","full_name":"sheldonhull/magetools","owner":"sheldonhull","description":"General tooling helpers for simplifying cross repository automation using Mage","archived":false,"fork":false,"pushed_at":"2024-10-27T01:14:35.000Z","size":6757,"stargazers_count":10,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-27T15:34:46.388Z","etag":null,"topics":["mage","magefile"],"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/sheldonhull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-27T23:20:55.000Z","updated_at":"2024-10-26T04:33:01.000Z","dependencies_parsed_at":"2023-10-02T04:45:02.910Z","dependency_job_id":"fff5605c-2082-480f-903e-63a6eff8765d","html_url":"https://github.com/sheldonhull/magetools","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fmagetools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fmagetools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fmagetools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fmagetools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheldonhull","download_url":"https://codeload.github.com/sheldonhull/magetools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221832170,"owners_count":16888186,"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":["mage","magefile"],"created_at":"2024-08-17T08:05:22.356Z","updated_at":"2024-10-28T13:31:13.508Z","avatar_url":"https://github.com/sheldonhull.png","language":"Go","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# magetools\n\n![Codecov](https://img.shields.io/codecov/c/github/sheldonhull/magetools?style=for-the-badge\u0026token=FPHYYO5ZF2)\n\nGeneral tooling helpers for simplifying cross-repository automation using Mage.\n\nThe test coverage shown is informal, as these aren't setup always with full standard tests.\nPrimarily the tests just import and run to confirm no errors.\nWhen possible, I do test the functionality.\n\nMage is a good case of a little magic making things faster and easier to adopt, while making it a bit trickier to test functions IMO.\n\n## Getting Bootstrapped On A New Repo\n\nJump start a new repo with the [GitHub - sheldonhull/scripts-to-rule-them-all-go](https://github.com/sheldonhull/scripts-to-rule-them-all-go)\n\n## Other Go Focused Tools for Task Automation\n\nWorth an honorable mention is [Goyek](https://github.com/goyek/goyek) which has a similar goal to Mage, but approaches with less magic and a similar design to writing tests.\nI opted not to use after a few months of working with it due to the alpha level changes occuring in project, and more effort required on adding tasks and remote imports[remote-imports-with-goyek].\n\nIf you don't have any desire to use remote imports, then Goyek can be a good option if you want to write in a style like Go testing.\n\nLastly, another worthy mention is [Gosh](https://github.com/mumoshu/gosh).\n\n## Remote Packages\n\n[How to Use Importing](https://magefile.org/importing/)\n\n## Mage\n\nInstall with Go 1.16+\n\n```shell\ngo install github.com/magefile/mage@latest\n```\n\n## Mage-Select\n\nNice little interactive prompt.\n\nAlias: `mage-select` as `mages`\n\n```shell\ngo install github.com/iwittkau/mage-select@latest\n```\n\n## Getting Started With Mage\n\nI need a way to bootstrap projects quickly with some tasks, so these directories give two different templates.\n\n1. `simple-single-file`: The simpliest for small projects, contains all tasks in single file.\n2. `root-imports-with-tasks-in-subdirectory`: Organized for normal projects, this provides a zero-install run (using `go run mage.go taskname`) and also organizes tasks into subdirectory.\n   This allows the root of the project to remain clean.\n   Tasks can then be easily split into files in the tasks directory such as: `mage.git.go, mage.js.go, etc`.\n\n## Why [dot] prefix in directory?\n\nGo commands that run like `go test ./...` automatically ignore dot or underscore prefixed files.\n\nI prefer to the dot prefix and underscore isn't very common from what I've observed in the Go echo system.\n\n## Tip\n\nInclude `mage_output_file.go` in your `gitignore` file to avoid it causing consternation in your git diff monitoring tooling.\n\n## Examples\n\nThe examples directory contains random mage examples I've used that don't fit yet into a package, or I haven't had the need to add any tests to reuse this in multiple places.\n\n## How To Use\n\n```go\n// mage:import\n_ \"github.com/sheldonhull/magetools/ci\"\n```\n\nNamespaced\n\n```go\n// mage:import ci\n\"github.com/sheldonhull/magetools/ci\"\n```\n\n## Update\n\nQuickly refresh library by running this on caller.\nThis should bypass the cached public version and call directly to quickly update if the cached go pkg version isn't registering an update.\n\n```shell\nGOPRIVATE=github.com/sheldonhull/* go get -u\nGOPRIVATE=github.com/sheldonhull/* go get -u github.com/sheldonhull/magetools/gotools@latest\n```\n\n```powershell\n$ENV:GOPRIVATE='github.com/sheldonhull/*'\n```\n\n## Allow Zero Install Run\n\nFrom the [Mage Docs].\nRun this using: `go run main.go` and it should work just like using `mage` directly.\n\n[mage docs]: https://magefile.org/zeroinstall\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheldonhull%2Fmagetools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheldonhull%2Fmagetools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheldonhull%2Fmagetools/lists"}