Skip to content

Commit 350687a

Browse files
committed
chore(make): remove makefile
remove makefile Signed-off-by: kovacs <[email protected]>
1 parent 2ab4981 commit 350687a

File tree

6 files changed

+116
-66
lines changed

6 files changed

+116
-66
lines changed

.cross_compile.sh

-31
This file was deleted.

Makefile

-26
This file was deleted.

Taskfile.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
version: '3'
2+
3+
tasks:
4+
clean:
5+
cmds:
6+
- rm -rf dist
7+
build:
8+
label: build-{{.TASK}}
9+
vars:
10+
VERSION:
11+
sh: git symbolic-ref -q --short HEAD || git describe --tags --exact-match
12+
BUILD_COMMIT:
13+
sh: git rev-parse HEAD
14+
BUILD_DATE:
15+
sh: date "+%F %T"
16+
cmds:
17+
- |
18+
GOOS={{.GOOS}} GOARCH={{.GOARCH}} GOARM={{.GOARM}} GOMIPS={{.GOMIPS}} \
19+
go build -trimpath -o dist/gitflow-toolkit-{{.TASK}} -ldflags \
20+
"-w -s -X main.version={{.VERSION}} -X main.buildCommit={{.BUILD_COMMIT}} -X 'main.buildDate=${BUILD_DATE}'"
21+
linux-386:
22+
cmds:
23+
- task: build
24+
vars: {
25+
TASK: "{{.TASK}}",
26+
GOOS: linux,
27+
GOARCH: 386
28+
}
29+
linux-amd64:
30+
cmds:
31+
- task: build
32+
vars: {
33+
TASK: "{{.TASK}}",
34+
GOOS: linux,
35+
GOARCH: amd64
36+
}
37+
linux-amd64-v3:
38+
cmds:
39+
- task: build
40+
vars: {
41+
TASK: "{{.TASK}}",
42+
GOOS: linux,
43+
GOARCH: amd64,
44+
GOAMD64: v3
45+
}
46+
linux-armv5:
47+
cmds:
48+
- task: build
49+
vars: {
50+
TASK: "{{.TASK}}",
51+
GOOS: linux,
52+
GOARCH: arm,
53+
GOARM: 5
54+
}
55+
linux-armv6:
56+
cmds:
57+
- task: build
58+
vars: {
59+
TASK: "{{.TASK}}",
60+
GOOS: linux,
61+
GOARCH: arm,
62+
GOARM: 6
63+
}
64+
linux-armv7:
65+
cmds:
66+
- task: build
67+
vars: {
68+
TASK: "{{.TASK}}",
69+
GOOS: linux,
70+
GOARCH: arm,
71+
GOARM: 7
72+
}
73+
linux-arm64:
74+
cmds:
75+
- task: build
76+
vars: {
77+
TASK: "{{.TASK}}",
78+
GOOS: linux,
79+
GOARCH: arm64
80+
}
81+
darwin-amd64:
82+
cmds:
83+
- task: build
84+
vars: {
85+
TASK: "{{.TASK}}",
86+
GOOS: darwin,
87+
GOARCH: amd64
88+
}
89+
darwin-arm64:
90+
cmds:
91+
- task: build
92+
vars: {
93+
TASK: "{{.TASK}}",
94+
GOOS: darwin,
95+
GOARCH: arm64
96+
}
97+
default:
98+
cmds:
99+
- task: clean
100+
- task: linux-386
101+
- task: linux-amd64
102+
- task: linux-amd64-v3
103+
- task: linux-armv5
104+
- task: linux-armv6
105+
- task: linux-armv7
106+
- task: linux-arm64
107+
- task: darwin-amd64
108+
- task: darwin-arm64

apps.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
var mainApp = &cli.App{
1212
Name: "gitflow-toolkit",
1313
Usage: "Git Flow ToolKit",
14-
Version: fmt.Sprintf("%s %s %s", version, buildDate, commitID),
14+
Version: fmt.Sprintf("%s %s %s", version, buildDate, buildCommit),
1515
Authors: []*cli.Author{{Name: "mritd", Email: "[email protected]"}},
1616
Copyright: "Copyright (c) " + time.Now().Format("2006") + " mritd, All rights reserved.",
1717
EnableBashCompletion: true,
@@ -44,7 +44,7 @@ func newBranchApp(ct string) *cli.App {
4444
Name: "git-" + string(ct),
4545
Usage: fmt.Sprintf("Create %s branch", ct),
4646
UsageText: fmt.Sprintf("git %s BRANCH", ct),
47-
Version: fmt.Sprintf("%s %s %s", version, buildDate, commitID),
47+
Version: fmt.Sprintf("%s %s %s", version, buildDate, buildCommit),
4848
Authors: []*cli.Author{{Name: "mritd", Email: "[email protected]"}},
4949
Copyright: "Copyright (c) " + time.Now().Format("2006") + " mritd, All rights reserved.",
5050
EnableBashCompletion: true,
@@ -65,7 +65,7 @@ func commitApp() *cli.App {
6565
Name: "git-ci",
6666
Usage: "Interactive commit",
6767
UsageText: "git ci",
68-
Version: fmt.Sprintf("%s %s %s", version, buildDate, commitID),
68+
Version: fmt.Sprintf("%s %s %s", version, buildDate, buildCommit),
6969
Authors: []*cli.Author{{Name: "mritd", Email: "[email protected]"}},
7070
Copyright: "Copyright (c) " + time.Now().Format("2006") + " mritd, All rights reserved.",
7171
EnableBashCompletion: true,
@@ -93,7 +93,7 @@ func checkMessageApp() *cli.App {
9393
Name: "commit-msg",
9494
Usage: "Commit message hook",
9595
UsageText: "commit-msg FILE",
96-
Version: fmt.Sprintf("%s %s %s", version, buildDate, commitID),
96+
Version: fmt.Sprintf("%s %s %s", version, buildDate, buildCommit),
9797
Authors: []*cli.Author{{Name: "mritd", Email: "[email protected]"}},
9898
Copyright: "Copyright (c) " + time.Now().Format("2006") + " mritd, All rights reserved.",
9999
EnableBashCompletion: true,
@@ -111,7 +111,7 @@ func pushApp() *cli.App {
111111
Name: "git-ps",
112112
Usage: "Push local branch to remote",
113113
UsageText: "git ps",
114-
Version: fmt.Sprintf("%s %s %s", version, buildDate, commitID),
114+
Version: fmt.Sprintf("%s %s %s", version, buildDate, buildCommit),
115115
Authors: []*cli.Author{{Name: "mritd", Email: "[email protected]"}},
116116
Copyright: "Copyright (c) " + time.Now().Format("2006") + " mritd, All rights reserved.",
117117
EnableBashCompletion: true,

main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

1212
var (
13-
version string
14-
buildDate string
15-
commitID string
13+
version string
14+
buildDate string
15+
buildCommit string
1616
)
1717

1818
func main() {

version

-1
This file was deleted.

0 commit comments

Comments
 (0)