Skip to content

Commit

Permalink
Ensure idempotent generation for vfsgen
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Sep 11, 2018
1 parent 6b9e952 commit 5eb69a8
Show file tree
Hide file tree
Showing 7 changed files with 562 additions and 25 deletions.
7 changes: 5 additions & 2 deletions asset/asset_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ package main
import (
"log"

"github.com/prometheus/alertmanager/asset"
"github.com/shurcooL/vfsgen"

"github.com/prometheus/alertmanager/asset"
"github.com/prometheus/alertmanager/pkg/idemvfs"
)

func main() {
err := vfsgen.Generate(asset.Assets, vfsgen.Options{
fs := idemvfs.NewFileSystem(asset.Assets, identifier)
err := vfsgen.Generate(fs, vfsgen.Options{
PackageName: "asset",
BuildTags: "!dev",
VariableName: "Assets",
Expand Down
163 changes: 163 additions & 0 deletions asset/assets_ident.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5eb69a8

Please sign in to comment.