Skip to content

Commit

Permalink
Merge pull request #83 from FusionAuth/degroff/fix_build
Browse files Browse the repository at this point in the history
fix build
  • Loading branch information
robotdan authored Jul 2, 2024
2 parents d604446 + 76060dd commit b523fa7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions build.savant
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, FusionAuth, All Rights Reserved
* Copyright (c) 2019-2024, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,10 +34,17 @@ project(group: "io.fusionauth", name: "go-client", version: "1.51.1", licenses:
release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0-RC.6")

target(name: "clean", description: "Cleans build directory") {
ProcessBuilder pb = new ProcessBuilder("go", "clean", "-x")
.inheritIO()
.directory(new File("./pkg/fusionauth/"))

def process = pb.start()
process.consumeProcessOutput(System.out, System.err)
process.waitFor()
}

target(name: "format", description: "Formats the source code") {
ProcessBuilder pb = new ProcessBuilder("go", "fmt")
ProcessBuilder pb = new ProcessBuilder("go", "fmt", "-x")
.inheritIO()
.directory(new File("./pkg/fusionauth/"))

Expand All @@ -47,6 +54,13 @@ target(name: "format", description: "Formats the source code") {
}

target(name: "compile", description: "Compiles the source code", dependsOn: ["format"]) {
ProcessBuilder pb = new ProcessBuilder("go", "build", "-v", "-x")
.inheritIO()
.directory(new File("./pkg/fusionauth/"))

def process = pb.start()
process.consumeProcessOutput(System.out, System.err)
process.waitFor()
}

target(name: "test", description: "Runs the project's unit tests", dependsOn: ["compile"]) {
Expand Down

0 comments on commit b523fa7

Please sign in to comment.