Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
/ gmake2 Public archive

Build a GMakefile at lightning speed!

License

Notifications You must be signed in to change notification settings

3JoB/gmake2

GMake2

This project is currently being reconstructed, please use the Release version instead of building it directly from the repo.

This image is from Gopher Konstructor

Build a GMakefile at lightning speed!

GitHub Workflow Status FOSSA Status MPL-2.0 Go Version GitHub release (latest by date)

GitHub Issues GitHub Repo stars GitHub release (latest by date) GitHub repo size GitHub commit activity

GMake2 Development Roadmap

This project is the follow-up maintenance of go-gmake.

Menu

Installing

Install from software source

This method is limited to systems using apt and dpkg for package management.

Please execute the following commands in the order they were written.

echo 'deb https://deb.lcag.org stable main' | sudo tee /etc/apt/sources.list.d/malonan.list

wget -qO - https://deb.lcag.org/public.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/malonan.gpg add -

sudo apt update && sudo apt install gmake2

Upgrade GMake2

apt update && apt upgrade

Install from Github Releases

Download the latest version from github.

Release

Install from source code

You can build gmake2 directly using Go build, but the version subcommand will not work properly.

git clone https://github.com/3JoB/gmake2 && cd gmake2

# gmake2 installed
gmake2

# gmake2 is not installed
go build -ldflags "-s -w -X 'main.SoftBuildTime=owner' -X 'main.SoftCommit=owner' -X 'main.SoftVersion=owner' -X 'main.SoftVersionCode=owner'"

Getting Started

Write the GMakefile.yml file in the current directory, the content is as follows

vars:
  msg: Hello World

all: |
  @echo {{.msg}}

mg: |
  @echo What's up???

Then run gmake2 on the current command line console, you can see the console print

Hello World

Or execute gmake2 mg to execute the specified command, and the console will print

What's up???

gmake2 automatically selects the all command when no command is specified.

Features

Keywords

Keywords moved to Wiki

Reserved Keyword

View in Wiki

Variables

Variables moved to Wiki

Examples

GMakefile.yml

vars:
  msg: Hello World
all: |
  @echo {{.msg}}
  # Modify the msg variable
  @var msg Hello
  @echo {{.msg}}
  # Create a file
  @touch from.txt
  @mv from.txt to.txt
  @cp to.txt from.txt
  @rm from.txt
  @rm to.txt
  @mkdir from
  @mv from to
  @cp to from
  @rm from
  @rm to
  @env GOOS linux
  go build
gmake2

Other information

  • Due to unsigned and some high-risk operations, GMake2 may be blocked by some anti-virus software. If you have installed anti-virus software on your device, please manually set GMake2 to the whitelist.
  • The binary released by GMake2 is compiled directly from the git library, the specific steps:
    • 1_ Write the update
    • 2_ Push to github
    • 3_ Run the gmake2 command to compile the binary
  • GMake2 only has the following binary distribution channels, and cannot guarantee that other channels are safe:

License

This software is distributed under MPL-2.0 license. :)

FOSSA Status