Skip to content

Commit cdc4b10

Browse files
committed
improve magefile
1 parent 6f99ee8 commit cdc4b10

7 files changed

Lines changed: 12 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tools/scripts/setup.ps1
3737
# for linux
3838
tools/scripts/setup.sh
3939

40-
mage release:all
40+
mage r
4141
```
4242

4343
### **Package Managers**

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ tools/scripts/setup.ps1
3838
tools/scripts/setup.sh
3939

4040
# 构建
41-
mage release:all
41+
mage r
4242
```
4343

4444
### **包管理器**

tools/doctor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/Masterminds/semver/v3"
1616
"github.com/caarlos0/log"
1717
"github.com/magefile/mage/mg"
18+
"github.com/opencommand/tinge"
1819
)
1920

2021
var (
@@ -27,7 +28,7 @@ var (
2728

2829
// Doctor checks the development environment and reports any issues.
2930
func Doctor() {
30-
log.Info("checking development environment...")
31+
log.Info(tinge.Styled().Bold("checking development environment...").String())
3132
start := time.Now()
3233

3334
mg.Deps(

tools/format.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"time"
88

99
"github.com/caarlos0/log"
10+
"github.com/opencommand/tinge"
1011
)
1112

1213
// Format automatically formats the source code using goimports.
1314
func Format() {
14-
log.Info("formatting code...")
15+
log.Info(tinge.Styled().Bold("formatting code...").String())
1516
start := time.Now()
1617

1718
err := runCmd("goimports", "-w", ".")

tools/gen.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ import (
88

99
"github.com/caarlos0/log"
1010
"github.com/magefile/mage/mg"
11+
"github.com/opencommand/tinge"
1112
)
1213

1314
// generates code (Go bindings, DSL grammar, etc).
1415
func Generate() {
15-
log.Info("generating code...")
16+
log.Info(tinge.Styled().Bold("generating code...").String())
1617
start := time.Now()
1718

1819
mg.Deps(generateHuloParser, generateUnsafeParser, generateStringer)

tools/lint.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"time"
88

99
"github.com/caarlos0/log"
10+
"github.com/opencommand/tinge"
1011
)
1112

1213
// Lint runs golangci-lint on the codebase.
1314
func Lint() {
14-
log.Info("running linter...")
15+
log.Info(tinge.Styled().Bold("running linter...").String())
1516
start := time.Now()
1617

1718
err := runCmd("golangci-lint", "run", "./...")

tools/setup.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import (
1818
"github.com/Masterminds/semver/v3"
1919
"github.com/caarlos0/log"
2020
"github.com/magefile/mage/mg"
21+
"github.com/opencommand/tinge"
2122
)
2223

2324
// Setup prepares the development environment and downloads dependencies.
2425
func Setup() {
25-
log.Info("setting up development environment...")
26+
log.Info(tinge.Styled().Bold("setting up development environment...").String())
2627
start := time.Now()
2728

2829
mg.Deps(installDevDeps, ensureAntlrJar, downloadDeps)

0 commit comments

Comments
 (0)