MCPcopy
hub / github.com/syncthing/syncthing / buildZip

Function buildZip

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

Source from the content-addressed store, hash-verified

569}
570
571func buildZip(target target, tags []string) {
572 name := archiveName(target)
573 filename := name + ".zip"
574
575 for _, tag := range tags {
576 if tag == "noupgrade" {
577 name += "-noupgrade"
578 break
579 }
580 }
581
582 build(target, tags)
583 codesign(target)
584
585 for i := range target.archiveFiles {
586 target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.BinaryName(), 1)
587 target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.BinaryName(), 1)
588 target.archiveFiles[i].dst = name + "/" + target.archiveFiles[i].dst
589 }
590
591 zipFile(filename, target.archiveFiles)
592 fmt.Println(filename)
593}
594
595func buildDeb(target target, tags []string) {
596 os.RemoveAll("deb")

Callers 1

runCommandFunction · 0.85

Calls 5

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

Tested by

no test coverage detected