Skip to content

Commit 0bcd77d

Browse files
author
Frank Martinez
committed
fix shim build
1 parent 87fbd73 commit 0bcd77d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

api/shim.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ func (sb *ShimBuilder) Build(project common.AppProject) error {
5555
}
5656

5757
if !built {
58+
fmt.Println("Using go build to build shim...")
59+
5860
err := simpleGoBuild(project)
5961
if err != nil {
6062
return err
@@ -124,7 +126,7 @@ func prepareShim(project common.AppProject, shim string) (bool, error) {
124126
makefilePath := filepath.Join(shimFilePath, dirShim, fileMakefile)
125127

126128
if _, err := os.Stat(goBuildFilePath); err == nil {
127-
fmt.Println("This trigger makes use of a go build file...")
129+
fmt.Println("Using build.go to build shim......")
128130

129131
err = util.CopyFile(goBuildFilePath, filepath.Join(project.SrcDir(), fileBuildGo))
130132
if err != nil {
@@ -136,15 +138,21 @@ func prepareShim(project common.AppProject, shim string) (bool, error) {
136138
if err != nil {
137139
return false, err
138140
}
141+
142+
return true, nil
139143
} else if _, err := os.Stat(makefilePath); err == nil {
140144
//look for Makefile and execute it
141-
fmt.Println("Make File:", makefilePath)
145+
fmt.Println("Using make file to build shim...")
142146

143147
err = util.CopyFile(makefilePath, filepath.Join(project.SrcDir(), fileMakefile))
144148
if err != nil {
145149
return false, err
146150
}
147151

152+
if Verbose() {
153+
fmt.Println("Make File:", makefilePath)
154+
}
155+
148156
// Execute make
149157
cmd := exec.Command("make", "-C", project.SrcDir())
150158
cmd.Stdout = os.Stdout
@@ -155,6 +163,8 @@ func prepareShim(project common.AppProject, shim string) (bool, error) {
155163
if err != nil {
156164
return false, err
157165
}
166+
167+
return true, nil
158168
} else {
159169
return false, nil
160170
}

0 commit comments

Comments
 (0)