Aura is a simple & fast build tool written in golang
the tool require aura.yaml file in your project to run
Commands:
aura build -t <targets>- run build targetsaura list- show available targetsaura init --template <type>- create new projectaura clean- remove build artifactsaura watch -t <targets>- watch files and rebuildaura validate- check config file
Variables:
- you can declare a variable using this syntax
vars:
CC: "gcc"
CFLAGS: "-Wall -o2"
vars:
GO: "go"
GFLAGS: "build -o"
OUT: "aura2.exe"- get a variable or env variable
$CC or ${CC}- Built in variables :
$cwdget current working directory$@get current target name$TIMESTAMPget current time
Targets:
- Declare a target
targets:
test:
run:
- "echo this is test"
build:
onerror: "This is a Custom Error" # custom error
run:
- "echo Target Name: $@"
- "$GO $GFLAGS $OUT"
deps:
- test
continue_on_error: false # if command fails exit for this target onlycontinue_on_errorif command fails exit for this target only- it can be declared as a global to all the targets
Prologue & Epilogue
- this will run always at the start
prologue:
run:
- "echo Working in $cwd"- this will run always at the end
epilogue:
run:
- "echo Finished at $TIMESTAMP"- they are targets too
Includes:
- You can include other files
include:
- "other_file.yaml"
Project Templates:
- Initialize new projects with templates
aura init --template go # Go project
aura init --template rust # Rust project
aura init --template node # Node.js project
aura init --template basic # Basic C/C++ projectVery Simple Example:
vars:
GO: "go"
FLAGS: "build -o"
EXE: "aura2.exe"
targets:
build:
run:
- "$GO $FLAGS $EXE"
start:
deps:
- build
run:
- "$EXE -h"Output:
PS I:\golang\Aura> aura build -t start
Building target: start
Dependency: build
go build -o aura2.exe
Usage of aura2.exe:
-D string
Working Directory (default ".")
-c string
Configuration file path (default "aura.yaml")
-v Enable verbose outputBuilding:
// linux
go env -w GOOS="linux"
go build
// windows
go env -w GOOS="windows"
go build
Development:
// run tests
go test ./...
// run with coverage
go test -cover ./...
// format code
go fmt ./...