{"id":14985687,"url":"https://github.com/efimovalex/gomake","last_synced_at":"2025-04-11T22:05:08.384Z","repository":{"id":57509342,"uuid":"233195054","full_name":"efimovalex/gomake","owner":"efimovalex","description":"Redesign of GNU Make (Makefile) oriented towards project management and command uniformisation among all your projects.","archived":false,"fork":false,"pushed_at":"2022-02-15T10:32:56.000Z","size":187,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T22:04:00.589Z","etag":null,"topics":["bash","cli","command-uniformisation","commandline-interface","golang","gomake","make","makefile","multi-os","project-management","yml"],"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/efimovalex.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-11T07:42:17.000Z","updated_at":"2024-09-14T08:41:27.000Z","dependencies_parsed_at":"2022-08-30T07:11:13.939Z","dependency_job_id":null,"html_url":"https://github.com/efimovalex/gomake","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efimovalex%2Fgomake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efimovalex%2Fgomake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efimovalex%2Fgomake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efimovalex%2Fgomake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efimovalex","download_url":"https://codeload.github.com/efimovalex/gomake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487716,"owners_count":21112191,"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":["bash","cli","command-uniformisation","commandline-interface","golang","gomake","make","makefile","multi-os","project-management","yml"],"created_at":"2024-09-24T14:11:29.291Z","updated_at":"2025-04-11T22:05:08.348Z","avatar_url":"https://github.com/efimovalex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gomake\n\n## Redesign of GNU Make (Makefile) oriented towards project management and command uniformisation among all your projects.\n\nWhen working in an microservice environment with multiple languages and/or frameworks it is sometimes hard to switch between command sets.\nThis is why I have created gomake to help better manage running commands between projects\n\n## Advantages over GNU Make for project management (not C compiling): \n - Works on windows\n - Bash commands are executed in the same context ( no more single line linked commands - ending in ;\\ )\n - Clearer settings file \n - Different declaration of variables and environment variables.\n - Uses only the cli you choose, no more Make extras\n\n## Examples: \n\nGo project\n```yml\ntargets:\n    run: go run /path/to/package\n```\n\nRuby on rails project: \n```yml\ntargets:\n    run: rails -s -b 0.0.0.0 -p 3000\n```\n\nPHP: \n```yml\ntargets:\n    run: php -S localhost:8000\n```\n\n#### For all three projects you need only to run `gomake run` in order to start the service or server.\n\n\n## Installation\n\nIf you have golang installed (and GOBIN is added to your path): \n\n```\ngo get github.com/efimovalex/gomake\n```\n\n### Linux:\n\n```\nwget https://github.com/efimovalex/gomake/releases/download/v1.0.0/gomake_1.0.0_Linux_x86_64.tar.gz\ntar -C /usr/local -xzf gomake_1.0.0_Linux_x86_64.tar.gz\n```\n\n### OS X\n```\nbrew tap efimovalex/gomake\nbrew install efimovalex/gomake/gomake\n```\n\n### Microsoft Windows: \n\nDownload the exe file for your system from the [latest release](https://github.com/efimovalex/gomake/releases/latest) and unarchive it to your `C:\\Windows` folder in order to be accesible from everywhere in the system.\nYou can create an alias to remove de `.exe` ending by running in PowerShell:\n\n```\nSet-Alias -Name gomake -Value C:\\Windows\\gomake.exe\n```\n\n\n## Project settings file: makefile.yml\nYou can provide you own file with the `-file=path/to/makefile.yml`\n\n### CLI \nPoint to the CLI you want to use: `bash`,`sh` and for windows `cmd`, `powershell` and `bash` (`bash.exe` if you have wsl)\n\n### VARS: target variables\n### Define variables that are replaced troughout your tagets defined in the yml file\n\n```yml\ncli: bash\nvars:\n    buildCmd: go build -ldflags \"-X main.BuildName=${package_name} -X main.BuildVersion=${version}\" \n    package_name: pkg\n    package: pkg\n    GOARCH: amd64\n    version: \"1.0.0\"\ntargets:\n    build_darwin: env GOOS=darwin GOARCH=${GOARCH} ${buildCmd} -o ${package_name}_v${version}_darwin_amd64 ${package}\n    build_windows: env GOOS=windows GOARCH=${GOARCH} ${buildCmd} -o ${package_name}_v${version}_windows_amd64.exe ${package}\n    build_linux: env GOOS=linux GOARCH=${GOARCH} ${buildCmd} -o ${package_name}_v${version}_linux_amd64 ${package}\n```\n\n## ENV: Environment variables\n### Define env variables that are loaded only for the purpose of your project isolated from your current environment\n\n```yml\ncli: bash\nvars: \n    package_name: pkg\n    package: pkg\n    version: \"1.0.0\"\n    buildCmd: go build -ldflags \"-X main.BuildName=${package_name} -X main.BuildVersion=${version}\" \nenv:\n    GOARCH: amd64\ntargets:\n    build_darwin: env GOOS=darwin ${buildCmd} -o ${package_name}_v${version}_darwin_amd64 ${package}\n    build_windows: env GOOS=windows ${buildCmd} -o ${package_name}_v${version}_windows_amd64.exe ${package}\n    build_linux: env GOOS=linux ${buildCmd} -o ${package_name}_v${version}_linux_amd64 ${package}\n```\n\n## Targets:\n### Commands that are run when the target name is provided\n\n```yml\ntargets:\n    build_darwin: env GOOS=darwin ${buildCmd} -o ${package_name}_v${version}_darwin_amd64 ${package}\n    build_windows: env GOOS=windows ${buildCmd} -o ${package_name}_v${version}_windows_amd64.exe ${package}\n    build_linux: env GOOS=linux ${buildCmd} -o ${package_name}_v${version}_linux_amd64 ${package}\n```\n\n```sh\ngomake build_darwin\n```\n\nIf the target is not found/defined you will get an error message saying: `no target found for {target}`\n\n### Multi OS\nIf you are working in an multi os team, you could define a separate file for windows users and provide that file on windows machines which should contain the same targets but defined as windows commands. \n\n```powershell\ngomake -f makefile_win.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefimovalex%2Fgomake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefimovalex%2Fgomake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefimovalex%2Fgomake/lists"}