mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
build: Add default purego tag to discosrv build
This commit is contained in:
parent
7a56e4a0e5
commit
ff0cd413e6
6
build.go
6
build.go
@ -47,6 +47,7 @@ type target struct {
|
|||||||
binaryName string
|
binaryName string
|
||||||
archiveFiles []archiveFile
|
archiveFiles []archiveFile
|
||||||
debianFiles []archiveFile
|
debianFiles []archiveFile
|
||||||
|
tags []string
|
||||||
}
|
}
|
||||||
|
|
||||||
type archiveFile struct {
|
type archiveFile struct {
|
||||||
@ -109,6 +110,7 @@ var targets = map[string]target{
|
|||||||
{src: "cmd/discosrv/LICENSE", dst: "deb/usr/share/doc/discosrv/LICENSE.txt", perm: 0644},
|
{src: "cmd/discosrv/LICENSE", dst: "deb/usr/share/doc/discosrv/LICENSE.txt", perm: 0644},
|
||||||
{src: "AUTHORS", dst: "deb/usr/share/doc/discosrv/AUTHORS.txt", perm: 0644},
|
{src: "AUTHORS", dst: "deb/usr/share/doc/discosrv/AUTHORS.txt", perm: 0644},
|
||||||
},
|
},
|
||||||
|
tags: []string{"purego"},
|
||||||
},
|
},
|
||||||
"relaysrv": {
|
"relaysrv": {
|
||||||
name: "relaysrv",
|
name: "relaysrv",
|
||||||
@ -350,6 +352,8 @@ func bench(pkgs ...string) {
|
|||||||
func install(target target, tags []string) {
|
func install(target target, tags []string) {
|
||||||
lazyRebuildAssets()
|
lazyRebuildAssets()
|
||||||
|
|
||||||
|
tags = append(target.tags, tags...)
|
||||||
|
|
||||||
cwd, err := os.Getwd()
|
cwd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@ -372,6 +376,8 @@ func install(target target, tags []string) {
|
|||||||
func build(target target, tags []string) {
|
func build(target target, tags []string) {
|
||||||
lazyRebuildAssets()
|
lazyRebuildAssets()
|
||||||
|
|
||||||
|
tags = append(target.tags, tags...)
|
||||||
|
|
||||||
rmr(target.binaryName)
|
rmr(target.binaryName)
|
||||||
args := []string{"build", "-i", "-v", "-ldflags", ldflags()}
|
args := []string{"build", "-i", "-v", "-ldflags", ldflags()}
|
||||||
if len(tags) > 0 {
|
if len(tags) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user