All Projects β†’ nstratos β†’ Make.go

nstratos / Make.go

Licence: unlicense
A Go script that could replace your Makefile.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects
script
160 projects

Projects that are alternatives of or similar to Make.go

Build Harness
πŸ€–Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+124.76%)
Mutual labels:  makefile, build-tool, build-automation
Zeus
An Electrifying Build System
Stars: ✭ 176 (+67.62%)
Mutual labels:  makefile, build-tool, build-automation
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (+371.43%)
Mutual labels:  makefile, build-tool
Buildout
Buildout is a deployment automation tool written in and extended with Python
Stars: ✭ 510 (+385.71%)
Mutual labels:  build-tool, build-automation
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+752.38%)
Mutual labels:  build-tool, build-automation
Xmake
πŸ”₯ A cross-platform build utility based on Lua
Stars: ✭ 4,229 (+3927.62%)
Mutual labels:  makefile, build-tool
Gradle In Action Source
Source code for the Manning book "Gradle in Action"
Stars: ✭ 483 (+360%)
Mutual labels:  build-tool, build-automation
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+561.9%)
Mutual labels:  build-tool, build-automation
makesure
Simple task/command runner with declarative goals and dependencies
Stars: ✭ 230 (+119.05%)
Mutual labels:  build-automation, build-tool
Doit
task management & automation tool
Stars: ✭ 972 (+825.71%)
Mutual labels:  build-tool, build-automation
Pi Builder
Extensible tool to build Arch Linux ARM for Raspberry Pi on x86_64 host using Docker
Stars: ✭ 31 (-70.48%)
Mutual labels:  makefile, build-tool
Ltx2any
Yet another LaTeX build wrapper, with one or two nifty features
Stars: ✭ 48 (-54.29%)
Mutual labels:  build-tool, build-automation
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+3978.1%)
Mutual labels:  makefile, build-tool
Cake
🍰 Cake (C# Make) is a cross platform build automation system.
Stars: ✭ 3,154 (+2903.81%)
Mutual labels:  build-tool, build-automation
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (+365.71%)
Mutual labels:  build-tool, build-automation
Poudriere
Port/Package build and test system
Stars: ✭ 257 (+144.76%)
Mutual labels:  makefile, build-automation
Erlang.mk
A build tool for Erlang that just works.
Stars: ✭ 538 (+412.38%)
Mutual labels:  makefile, build-tool
Pybuilder
Software build automation tool for Python.
Stars: ✭ 1,290 (+1128.57%)
Mutual labels:  build-tool, build-automation
jagen
A software engineer's workspace manager and build systems wrapper
Stars: ✭ 32 (-69.52%)
Mutual labels:  build-automation, build-tool
obs-docu
Official Open Build Service Documentation. Content gets reviewed and edited. Generated books are available at http://www.openbuildservice.org
Stars: ✭ 26 (-75.24%)
Mutual labels:  build-automation, build-tool

make.go

A Go script that could replace your Makefile.

Features

  • Automated versioning of produced binaries.
  • Parallel cross compilation for all target platforms.

Usage

This script is meant to live in your project's root and used with go run make.go.

  • go run make.go builds a versioned binary for the current platform.
  • go run make.go -os windows -arch amd64 builds a versioned binary for a specific platform.
  • go run make.go --release builds versioned binaries for all target platforms.
  • go run make.go --clean removes produced binaries.

Rationale

Having quite a few Go projects that produce a single binary, I was looking for a good way to have automated versioning and easily produce binaries for all the platforms that I want to support. Of course, Go can easily cross compile binaries and by using --ldflags when building we can also add a version to our produced binary. Naturally I wrote a Makefile that did all this.

But then I thought, how would this look if it was written in Go?

Reasons to use a make.go instead of a more succinct Makefile

  • Your project has a non trivial building procedure that could benefit from being expressed in robust Go code.
  • You want the increased portability of Go.
  • You like writing Go!

How to use this make.go

This is by no means a generic script that can be used without modifications but you can use it as a starting point. The idea is to have a make.go specific for your project that could act as your build script and possibly do other more complex stuff. The source code is public domain so if you find the content useful and want to use it as a starting point, simply copy make.go, modify it and extend it according to the needs of your project.

Disclaimer

Now I am not suggesting that you should go and replace all your Makefiles with Go scripts. I wrote this as an experiment for my specific case, I thought the code might be useful to others and decided to share it. If a Makefile or other script gets the job done then you should use that.

Good alternatives

  • A Makefile or other script.
  • Gox, my personal favorite cross compile tool.
  • Mage, make.go on steroids.

Contributing

If you would like to add to this basic make.go, you are welcome to do so.

License

The source code is public domain.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].