include the version that pack is running on for filtering the build gen metadata
This commit is contained in:
parent
ea03e1b6e7
commit
0f6cbf1be2
2
Makefile
2
Makefile
@ -298,7 +298,7 @@ actors-gen: actors-code-gen fiximports
|
||||
.PHONY: actors-gen
|
||||
|
||||
bundle-gen:
|
||||
$(GOCC) run ./gen/bundle $(RELEASE) $(RELEASE_OVERRIDES)
|
||||
$(GOCC) run ./gen/bundle $(VERSION) $(RELEASE) $(RELEASE_OVERRIDES)
|
||||
$(GOCC) fmt ./build/...
|
||||
.PHONY: bundle-gen
|
||||
|
||||
|
@ -52,4 +52,4 @@ popd
|
||||
|
||||
echo "Generating metadata..."
|
||||
|
||||
make -C ../../ RELEASE="$RELEASE" RELEASE_OVERRIDES="${RELEASE_OVERRIDES[*]}" bundle-gen
|
||||
make -C ../../ VERSION="$VERSION" RELEASE="$RELEASE" RELEASE_OVERRIDES="${RELEASE_OVERRIDES[*]}" bundle-gen
|
||||
|
@ -45,24 +45,34 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var metadataSpecificVersion []*build.BuiltinActorsMetadata
|
||||
|
||||
// see ./build/actors/pack.sh
|
||||
// expected args are git bundle tag then number of per network overrides
|
||||
// overrides are in the format network_name=override
|
||||
overrides := map[string]string{}
|
||||
for _, override := range os.Args[2:] {
|
||||
network, version := splitOverride(override)
|
||||
overrides[network] = version
|
||||
}
|
||||
|
||||
if len(os.Args) > 1 {
|
||||
version := os.Args[1]
|
||||
overrides := map[string]string{}
|
||||
for _, override := range os.Args[3:] {
|
||||
k, v := splitOverride(override)
|
||||
overrides[k] = v
|
||||
}
|
||||
for _, m := range metadata {
|
||||
if strings.HasPrefix(version, fmt.Sprintf("v%d", m.Version)) {
|
||||
// correct version
|
||||
override, ok := overrides[m.Network]
|
||||
if ok && strings.HasPrefix(override, fmt.Sprintf("v%d", m.Version)) {
|
||||
if ok {
|
||||
m.BundleGitTag = override
|
||||
} else {
|
||||
m.BundleGitTag = os.Args[1]
|
||||
m.BundleGitTag = os.Args[2]
|
||||
}
|
||||
fmt.Println("hi")
|
||||
metadataSpecificVersion = append(metadataSpecificVersion, m)
|
||||
}
|
||||
}
|
||||
metadata = metadataSpecificVersion
|
||||
|
||||
}
|
||||
|
||||
fi, err := os.Create("./build/builtin_actors_gen.go")
|
||||
|
Loading…
Reference in New Issue
Block a user