mirror of
https://github.com/octoleo/restic.git
synced 2024-12-01 09:13:56 +00:00
helper: download modules as first step
There's no use in running that step in parallel.
This commit is contained in:
parent
7f0929e519
commit
c3374b3ea5
@ -232,6 +232,18 @@ var defaultBuildTargets = map[string][]string{
|
|||||||
"solaris": {"amd64"},
|
"solaris": {"amd64"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func downloadModules(sourceDir string) {
|
||||||
|
c := exec.Command("go", "mod", "download")
|
||||||
|
c.Stdout = os.Stdout
|
||||||
|
c.Stderr = os.Stderr
|
||||||
|
c.Dir = sourceDir
|
||||||
|
|
||||||
|
err := c.Run()
|
||||||
|
if err != nil {
|
||||||
|
die("error downloading modules: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if len(pflag.Args()) != 0 {
|
if len(pflag.Args()) != 0 {
|
||||||
die("USAGE: build-release-binaries [OPTIONS]")
|
die("USAGE: build-release-binaries [OPTIONS]")
|
||||||
@ -241,5 +253,6 @@ func main() {
|
|||||||
outputDir := abs(opts.OutputDir)
|
outputDir := abs(opts.OutputDir)
|
||||||
mkdir(outputDir)
|
mkdir(outputDir)
|
||||||
|
|
||||||
|
downloadModules(sourceDir)
|
||||||
buildTargets(sourceDir, outputDir, defaultBuildTargets)
|
buildTargets(sourceDir, outputDir, defaultBuildTargets)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user