Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Bindata iff TAGS="bindata" and not up-to-date #10004

Merged
merged 12 commits into from
Jan 27, 2020
Merged
Next Next commit
Only generate bindata if necessary
  • Loading branch information
zeripath committed Jan 26, 2020
commit aec9553b3d535e355af96a10da3adfe24af9d790
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ vet:

.PHONY: generate
generate: fomantic js css
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
GO111MODULE=on $(GO) generate -mod=vendor -tags '$(TAGS)' $(PACKAGES)
zeripath marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: generate-swagger
generate-swagger:
Expand Down
2 changes: 0 additions & 2 deletions modules/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package options

//go:generate go run -mod=vendor main.go

type directorySet map[string][]string

func (s directorySet) Add(key string, value []string) {
Expand Down
9 changes: 9 additions & 0 deletions modules/options/options_bindata.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

//+build bindata

package options

//go:generate go run -mod=vendor main.go
2 changes: 0 additions & 2 deletions modules/public/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"gitea.com/macaron/macaron"
)

//go:generate go run -mod=vendor main.go

// Options represents the available options to configure the macaron handler.
type Options struct {
Directory string
Expand Down
9 changes: 9 additions & 0 deletions modules/public/public_bindata.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

//+build bindata

package public

//go:generate go run -mod=vendor main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

//+build bindata

package templates

//go:generate go run -mod=vendor main.go