Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build #83

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading