Skip to content

Commit

Permalink
Modify top-level build-all script to also compile/test go code
Browse files Browse the repository at this point in the history
  • Loading branch information
la3lma committed Nov 22, 2019
1 parent 7c34ff5 commit bbbd2d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions build-all.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,23 @@ func main() {
if !*doGoPtr {
log.Printf(" ... Not building/testing GO code")
} else {
log.Printf(" ... Building of GO code not implemented yet.")
log.Printf(" ... Building and testing go code.")
goscript.AssertSuccesfulRun("go build ./...")
goscript.AssertSuccesfulRun("go test ./...")
goscript.AssertSuccesfulRun("~/go/bin/staticcheck ./...")
}

if !*doJvmPtr {
log.Printf(" ... Not building/testing JVM based code.")

} else {
log.Printf(" ... Building/testing JVM based code.")
//
// Ensure that all preconditions for building and testing are met, if not
// fail and terminate execution.
//

goscript.AssertThatScriptCommandsAreAvailable("docker-compose", "./gradlew", "docker", "cmp")
goscript.AssertThatScriptCommandsAreAvailable("docker-compose", "./gradlew", "docker", "cmp", "go")

projectProfile := parseServiceAccountFile("prime-service-account.json")

Expand Down
2 changes: 1 addition & 1 deletion github.com/ostelco-core/goscript/goscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func checkIfDockerIsRunning() bool {
out, err := exec.Command("bash", "-c", cmd).Output()
ostring := string(out)

if "Docker not running" == ostring && err == nil {
if ostring == "Docker not running" && err == nil {
return false
}

Expand Down

0 comments on commit bbbd2d7

Please sign in to comment.