{"id":17212098,"url":"https://github.com/carolynvs/magex","last_synced_at":"2025-04-13T22:31:53.996Z","repository":{"id":38840391,"uuid":"311471050","full_name":"carolynvs/magex","owner":"carolynvs","description":"Helper methods for Magefiles","archived":false,"fork":false,"pushed_at":"2023-01-17T17:36:27.000Z","size":116,"stargazers_count":33,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T12:52:33.911Z","etag":null,"topics":["go","golang","mage","magefile","make"],"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/carolynvs.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}},"created_at":"2020-11-09T21:36:11.000Z","updated_at":"2024-12-03T12:52:30.000Z","dependencies_parsed_at":"2023-02-10T10:55:12.869Z","dependency_job_id":null,"html_url":"https://github.com/carolynvs/magex","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carolynvs%2Fmagex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carolynvs%2Fmagex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carolynvs%2Fmagex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carolynvs%2Fmagex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carolynvs","download_url":"https://codeload.github.com/carolynvs/magex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790651,"owners_count":21162068,"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","golang","mage","magefile","make"],"created_at":"2024-10-15T02:59:14.324Z","updated_at":"2025-04-13T22:31:53.549Z","avatar_url":"https://github.com/carolynvs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magefile Extensions\n\n![test](https://github.com/carolynvs/magex/workflows/test/badge.svg)\n\nThis library provides helper methods to use with [mage](https://magefile.org).\n\nBelow is a sample of the type of helpers available. Full examples and\ndocumentation is on [godoc](https://godoc.org/github.com/carolynvs/magex).\n\n```go\n// +build mage\n\npackage main\n\nimport (\n\t\"github.com/carolynvs/magex/pkg\"\n\t\"github.com/carolynvs/magex/shx\"\n)\n\n// Check if packr2 is in the bin/ directory and is at least v2.\n// If not, install packr@v2.8.0 into bin/\nfunc EnsurePackr2() error {\n\topts := pkg.EnsurePackageOptions{\n\t\tName: \"github.com/gobuffalo/packr/v2/packr2\",\n\t\tDefaultVersion: \"v2.8.0\",\n\t\tVersionCommand: \"version\",\n\t\tDestination: \"bin\",\n    }\n   return pkg.EnsurePackageWith(opts)\n}\n\n// Install mage if it's not available, and ensure it's in PATH. We don't care which version\nfunc Mage() error {\n    return pkg.EnsureMage(\"\")\n}\n\n// Run a docker registry in a container. Do not print stdout and only print\n// stderr when the command fails even when -v is set.\n//\n// Useful for commands that you only care about when it fails, keeping unhelpful\n// output out of your logs.\nfunc StartRegistry() error {\n    return shx.RunE(\"docker\", \"run\", \"-d\", \"-p\", \"5000:5000\", \"--name\", \"registry\", \"registry:2\")\n}\n\n// Use go to download a tool, build and install it manually so \n// that it has version information embedded in the final binary.\nfunc CustomInstallTool() error {\n\terr := shx.RunE(\"go\", \"get\", \"-u\", \"github.com/magefile/mage\")\n\tif err != nil {\n    \t\treturn err\n\t}\n    \n\tsrc := filepath.Join(GOPATH(), \"src/github.com/magefile/mage\")\n\treturn shx.Command(\"go\", \"run\", \"bootstrap.go\").In(src).RunE()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarolynvs%2Fmagex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarolynvs%2Fmagex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarolynvs%2Fmagex/lists"}