add bundle git tag from pack.sh into builtin_actors_gen
This commit is contained in:
parent
23eaee49d4
commit
ea82f554be
2
Makefile
2
Makefile
@ -298,7 +298,7 @@ actors-gen: actors-code-gen fiximports
|
||||
.PHONY: actors-gen
|
||||
|
||||
bundle-gen:
|
||||
$(GOCC) run ./gen/bundle
|
||||
$(GOCC) run ./gen/bundle $(RELEASE)
|
||||
$(GOCC) fmt ./build/...
|
||||
.PHONY: bundle-gen
|
||||
|
||||
|
@ -52,4 +52,4 @@ popd
|
||||
|
||||
echo "Generating metadata..."
|
||||
|
||||
make -C ../../ bundle-gen
|
||||
make -C ../../ RELEASE="$RELEASE" bundle-gen
|
||||
|
@ -99,6 +99,7 @@ type BuiltinActorsMetadata struct {
|
||||
Version actorstypes.Version
|
||||
ManifestCid cid.Cid
|
||||
Actors map[string]cid.Cid
|
||||
BundleGitTag string
|
||||
}
|
||||
|
||||
// ReadEmbeddedBuiltinActorsMetadata reads the metadata from the embedded built-in actor bundles.
|
||||
|
@ -20,6 +20,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
|
||||
{{- range . }} {
|
||||
Network: {{printf "%q" .Network}},
|
||||
Version: {{.Version}},
|
||||
{{if .BundleGitTag}} BundleGitTag: {{printf "%q" .BundleGitTag}}, {{end}}
|
||||
ManifestCid: MustParseCid({{printf "%q" .ManifestCid}}),
|
||||
Actors: map[string]cid.Cid {
|
||||
{{- range $name, $cid := .Actors }}
|
||||
@ -37,6 +38,12 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if len(os.Args) > 1 {
|
||||
for _, m := range metadata {
|
||||
m.BundleGitTag = os.Args[1]
|
||||
}
|
||||
}
|
||||
|
||||
fi, err := os.Create("./build/builtin_actors_gen.go")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user