Skip to content

A simple build management tool for Go, offering multiple build profiles and enhanced workflows for developers

License

Notifications You must be signed in to change notification settings

LuernOutOfOrder/LezGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LezGo

A simple build and dependency management tool for Go, offering multiple build profiles and enhanced workflows for developers

Installation

go get -u github.com/LezGo/lezgo

Usage

lezgo [command]

Configuration File

LezGo uses a configuration file named lezgo.yml to manage build profiles and dependencies. The configuration file should be placed in the root directory of the project.

Example Configuration File

name: my_project
author: <your_name>
entrypoint: main.go
version: 0.1.0
profiles:
  debug:
    flags: ["-gcflags", "all=-N -l"]
    env:
      GO_ENV: debug
    output: ./bin/debug/
    tags: ["debug"]
    ldflags: ""

  release:
    flags: ["-ldflags", "-s -w"]
    env:
      GO_ENV: production
    output: ./bin/release/
    tags: ["release"]
    ldflags: "-X main.version=1.0.0"

Cross-Compilation

LezGo supports cross-compilation by specifying the target platform and architecture in the configuration file directly on a build profile. By passing the flag --cross-compilation or -c, LezGo will build the project for the target platform and architecture specified in the configuration file.

Example Cross-Compilation Configuration

# Cross-compilation
profiles:
    debug:
      flags: ["-gcflags", "all=-N -l"]
      env:
        GO_ENV: debug
      output: ./bin/debug/
      tags: ["debug"]
      os-target: linux
      arch: amd64

Commands

  • init - Initialize a new LezGo project
  • build - Build the project

Flags

Build Command

  • --cross-compilation or -c - Build the project for the target platform and architecture specified in the configuration file
  • --profile or -p - Specify the build profile to use

About

A simple build management tool for Go, offering multiple build profiles and enhanced workflows for developers

Resources

License

Stars

Watchers

Forks

Packages

No packages published