mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-15 18:08:45 -07:00
build: Take extra tags in account for tar, zip
This commit is contained in:
parent
db1f20603a
commit
b253022a96
42
build.go
42
build.go
@ -278,22 +278,18 @@ func main() {
|
||||
}
|
||||
|
||||
func runCommand(cmd string, target target) {
|
||||
var tags []string
|
||||
if noupgrade {
|
||||
tags = []string{"noupgrade"}
|
||||
}
|
||||
tags = append(tags, strings.Fields(extraTags)...)
|
||||
|
||||
switch cmd {
|
||||
case "install":
|
||||
var tags []string
|
||||
if noupgrade {
|
||||
tags = []string{"noupgrade"}
|
||||
}
|
||||
tags = append(tags, strings.Fields(extraTags)...)
|
||||
install(target, tags)
|
||||
metalintShort()
|
||||
|
||||
case "build":
|
||||
var tags []string
|
||||
if noupgrade {
|
||||
tags = []string{"noupgrade"}
|
||||
}
|
||||
tags = append(tags, strings.Fields(extraTags)...)
|
||||
build(target, tags)
|
||||
|
||||
case "test":
|
||||
@ -321,10 +317,10 @@ func runCommand(cmd string, target target) {
|
||||
transifex()
|
||||
|
||||
case "tar":
|
||||
buildTar(target)
|
||||
buildTar(target, tags)
|
||||
|
||||
case "zip":
|
||||
buildZip(target)
|
||||
buildZip(target, tags)
|
||||
|
||||
case "deb":
|
||||
buildDeb(target)
|
||||
@ -539,14 +535,15 @@ func appendParameters(args []string, tags []string, pkgs ...string) []string {
|
||||
return append(args, pkgs...)
|
||||
}
|
||||
|
||||
func buildTar(target target) {
|
||||
func buildTar(target target, tags []string) {
|
||||
name := archiveName(target)
|
||||
filename := name + ".tar.gz"
|
||||
|
||||
var tags []string
|
||||
if noupgrade {
|
||||
tags = []string{"noupgrade"}
|
||||
name += "-noupgrade"
|
||||
for _, tag := range tags {
|
||||
if tag == "noupgrade" {
|
||||
name += "-noupgrade"
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
build(target, tags)
|
||||
@ -562,14 +559,15 @@ func buildTar(target target) {
|
||||
fmt.Println(filename)
|
||||
}
|
||||
|
||||
func buildZip(target target) {
|
||||
func buildZip(target target, tags []string) {
|
||||
name := archiveName(target)
|
||||
filename := name + ".zip"
|
||||
|
||||
var tags []string
|
||||
if noupgrade {
|
||||
tags = []string{"noupgrade"}
|
||||
name += "-noupgrade"
|
||||
for _, tag := range tags {
|
||||
if tag == "noupgrade" {
|
||||
name += "-noupgrade"
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
build(target, tags)
|
||||
|
Loading…
Reference in New Issue
Block a user