Giter Site home page Giter Site logo

gobuilder's Introduction

中文 | En

What's gobuilder?

Gobuilder is a tool for building Go binaries. It is similar to the Go tool, but it supports building multiple binaries at once and supports custom build configurations without creating any script.

Features

  • Builds binaries for any platform from go source code.
  • Packs binaries with UPX.
  • Obfuscate binaries with garble for windows.
  • Sign windows exe with osslsigncode.
  • Zip binaries automatically.
  • Builds binaries at anywhere in a go project.
  • Remembers the build operations forever.
  • No script is needed.

Note:if you wanna sign windows binaries with osslsigncode, you will need to manually add following fields to build/gbuild.json for gobuilder:

// Example:
{
    "osslsigncode": true,
    "pfx_file_path":"/home/moqsien/golang/src/gvcgo/version-manager/scripts/vmr.pfx",
    "pfx_password":"Vmr2024",
    "pfx_company":"GVC",
    "pfx_website":"https://github.com/gvcgo/",
}

How to use?

  • Install
go install github.com/gvcgo/gobuilder/cmd/[email protected]
  • Usage
gber build <your-go-build-flags-and-args>

Note: If you need to inject variables when building go source code, "$" should be replaced with "#".

# original
gber build -ldflags "-X main.GitTag=$(git describe --abbrev=0 --tags) -X main.GitHash=$(git show -s --format=%H)  -s -w" ./cmd/vmr/

# replaced
gber build -ldflags "-X main.GitTag=#(git describe --abbrev=0 --tags) -X main.GitHash=#(git show -s --format=%H)  -s -w" ./cmd/vmr

gobuilder's People

Contributors

moqsien avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.