File tree 2 files changed +19
-6
lines changed 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ release:
32
32
clean :
33
33
rm -f cmd/nash/nash
34
34
rm -f cmd/nashfmt/nashfmt
35
- rm -f dist
35
+ rm -rf dist
Original file line number Diff line number Diff line change @@ -15,18 +15,31 @@ setenv CGO_ENABLED = "0"
15
15
16
16
mkdir -p dist
17
17
18
+ fn copy_exec(src, dst) {
19
+ if $os == " windows" {
20
+ src = $src +" .exe"
21
+ dst = $dst +" .exe"
22
+ }
23
+
24
+ cp $src $dst
25
+ }
26
+
18
27
for os in $supported_os {
19
28
setenv GOOS = $os
20
29
setenv GOARCH = " amd64"
21
30
22
31
echo " building OS: " +$GOOS +" ARCH : " +$GOARCH
23
32
make build " version=" +$version
24
33
25
- binpath < = format( " dist /nash-%s-%s-amd64 " , $version , $os )
34
+ source_nash = " cmd /nash/nash "
26
35
27
- if $os ! = " windows" {
28
- binpath = $binpath +" .exe"
29
- }
36
+ target_nash < = format(" dist/nash-%s-%s-amd64" , $version , $os )
37
+
38
+ copy_exec($source_nash , $target_nash )
39
+
40
+ source_nashfmt = " cmd/nashfmt/nashfmt"
41
+
42
+ target_nashfmt < = format(" dist/nashfmt-%s-%s-amd64" , $version , $os )
30
43
31
- cp " cmd/nash/nash " $binpath
44
+ copy_exec( $source_nashfmt , $target_nashfmt )
32
45
}
You can’t perform that action at this time.
0 commit comments