github.com/FusionAuth/go-client@v0.0.0-20240425220342-2317e10dfcf5/build.savant (about) 1 /* 2 * Copyright (c) 2019-2023, FusionAuth, All Rights Reserved 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, 11 * software distributed under the License is distributed on an 12 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 13 * either express or implied. See the License for the specific 14 * language governing permissions and limitations under the License. 15 */ 16 17 project(group: "io.fusionauth", name: "go-client", version: "1.50.1", licenses: ["ApacheV2_0"]) { 18 workflow { 19 fetch { 20 cache() 21 url(url: "https://repository.savantbuild.org") 22 } 23 publish { 24 cache() 25 } 26 } 27 28 publishWorkflow { 29 subversion(repository: "https://svn.savantbuild.org") 30 } 31 } 32 33 // Plugins 34 release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0-RC.6") 35 36 target(name: "clean", description: "Cleans build directory") { 37 } 38 39 target(name: "format", description: "Formats the source code") { 40 ProcessBuilder pb = new ProcessBuilder("go", "fmt") 41 .inheritIO() 42 .directory(new File("./pkg/fusionauth/")) 43 44 def process = pb.start() 45 process.consumeProcessOutput(System.out, System.err) 46 process.waitFor() 47 } 48 49 target(name: "compile", description: "Compiles the source code", dependsOn: ["format"]) { 50 } 51 52 target(name: "test", description: "Runs the project's unit tests", dependsOn: ["compile"]) { 53 ProcessBuilder pb = new ProcessBuilder("go", "test") 54 .inheritIO() 55 .directory(new File("./pkg/fusionauth/")) 56 57 def process = pb.start() 58 process.consumeProcessOutput(System.out, System.err) 59 process.waitFor() 60 } 61 62 target(name: "int", description: "Releases a local integration build of the project", dependsOn: ["compile"]) { 63 } 64 65 target(name: "idea", description: "Updates the IntelliJ IDEA module file") { 66 } 67 68 target(name: "bundle", description: "Builds the project release bundle", dependsOn: "int") { 69 } 70 71 target(name: "release", description: "Releases a full version of the project", dependsOn: ["int"]) { 72 release.release() 73 }