MCPcopy
hub / github.com/syncthing/syncthing / buildTar

Function buildTar

build.go:547–569  ·  view source on GitHub ↗
(target target, tags []string)

Source from the content-addressed store, hash-verified

545}
546
547func buildTar(target target, tags []string) {
548 name := archiveName(target)
549 filename := name + ".tar.gz"
550
551 for _, tag := range tags {
552 if tag == "noupgrade" {
553 name += "-noupgrade"
554 break
555 }
556 }
557
558 build(target, tags)
559 codesign(target)
560
561 for i := range target.archiveFiles {
562 target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.BinaryName(), 1)
563 target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.BinaryName(), 1)
564 target.archiveFiles[i].dst = name + "/" + target.archiveFiles[i].dst
565 }
566
567 tarGz(filename, target.archiveFiles)
568 fmt.Println(filename)
569}
570
571func buildZip(target target, tags []string) {
572 name := archiveName(target)

Callers 1

runCommandFunction · 0.85

Calls 5

buildFunction · 0.90
archiveNameFunction · 0.85
codesignFunction · 0.85
tarGzFunction · 0.85
BinaryNameMethod · 0.80

Tested by

no test coverage detected