use build tags to embed appropriate bundles
This commit is contained in:
parent
995caaaace
commit
7e1c55cdf9
@ -58,10 +58,26 @@ fetch_bundle() {
|
||||
popd
|
||||
}
|
||||
|
||||
touch_bundles() {
|
||||
ver=$1
|
||||
|
||||
if [ ! -e $ver ]; then
|
||||
mkdir $ver
|
||||
fi
|
||||
|
||||
for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing; do
|
||||
touch $ver/builtin-actors-$net.car
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "$actors7_release" ]; then
|
||||
fetch v7 "$actors7_release"
|
||||
else
|
||||
touch_bundles v7
|
||||
fi
|
||||
|
||||
if [ -n "$actors8_release" ]; then
|
||||
fetch v8 "$actors8_release"
|
||||
else
|
||||
touch_bundles v8
|
||||
fi
|
||||
|
22
build/builtin_actors_2k.go
Normal file
22
build/builtin_actors_2k.go
Normal file
@ -0,0 +1,22 @@
|
||||
//go:build debug || 2k || testground
|
||||
// +build debug 2k testground
|
||||
|
||||
package build
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed builtin-actors/v8/builtin-actors-devnet.car
|
||||
var actorsv8 []byte
|
||||
|
||||
func BuiltinActorsV8Bundle() []byte {
|
||||
return actorsv8
|
||||
}
|
||||
|
||||
//go:embed builtin-actors/v7/builtin-actors-devnet.car
|
||||
var actorsv7 []byte
|
||||
|
||||
func BuiltinActorsV7Bundle() []byte {
|
||||
return actorsv7
|
||||
}
|
22
build/builtin_actors_butterfly.go
Normal file
22
build/builtin_actors_butterfly.go
Normal file
@ -0,0 +1,22 @@
|
||||
//go:build butterflynet
|
||||
// +build butterflynet
|
||||
|
||||
package build
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed builtin-actors/v8/builtin-actors-butterflynet.car
|
||||
var actorsv8 []byte
|
||||
|
||||
func BuiltinActorsV8Bundle() []byte {
|
||||
return actorsv8
|
||||
}
|
||||
|
||||
//go:embed builtin-actors/v7/builtin-actors-butterflynet.car
|
||||
var actorsv7 []byte
|
||||
|
||||
func BuiltinActorsV7Bundle() []byte {
|
||||
return actorsv7
|
||||
}
|
@ -1,17 +1,20 @@
|
||||
//go:build calibnet
|
||||
// +build calibnet
|
||||
|
||||
package build
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed builtin-actors/builtin-actors-v8.car
|
||||
//go:embed builtin-actors/v8/builtin-actors-calibrationnet.car
|
||||
var actorsv8 []byte
|
||||
|
||||
func BuiltinActorsV8Bundle() []byte {
|
||||
return actorsv8
|
||||
}
|
||||
|
||||
//go:embed builtin-actors/builtin-actors-v7.car
|
||||
//go:embed builtin-actors/v7/builtin-actors-calibrationnet.car
|
||||
var actorsv7 []byte
|
||||
|
||||
func BuiltinActorsV7Bundle() []byte {
|
22
build/builtin_actors_interop.go
Normal file
22
build/builtin_actors_interop.go
Normal file
@ -0,0 +1,22 @@
|
||||
//go:build interopnet
|
||||
// +build interopnet
|
||||
|
||||
package build
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed builtin-actors/v8/builtin-actors-caterpillarnet.car
|
||||
var actorsv8 []byte
|
||||
|
||||
func BuiltinActorsV8Bundle() []byte {
|
||||
return actorsv8
|
||||
}
|
||||
|
||||
//go:embed builtin-actors/v7/builtin-actors-caterpillarnet.car
|
||||
var actorsv7 []byte
|
||||
|
||||
func BuiltinActorsV7Bundle() []byte {
|
||||
return actorsv7
|
||||
}
|
22
build/builtin_actors_mainnet.go
Normal file
22
build/builtin_actors_mainnet.go
Normal file
@ -0,0 +1,22 @@
|
||||
//go:build !debug && !2k && !testground && !calibnet && !nerpanet && !butterflynet && !interopnet
|
||||
// +build !debug,!2k,!testground,!calibnet,!nerpanet,!butterflynet,!interopnet
|
||||
|
||||
package build
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed builtin-actors/v8/builtin-actors-mainnet.car
|
||||
var actorsv8 []byte
|
||||
|
||||
func BuiltinActorsV8Bundle() []byte {
|
||||
return actorsv8
|
||||
}
|
||||
|
||||
//go:embed builtin-actors/v7/builtin-actors-mainnet.car
|
||||
var actorsv7 []byte
|
||||
|
||||
func BuiltinActorsV7Bundle() []byte {
|
||||
return actorsv7
|
||||
}
|
Loading…
Reference in New Issue
Block a user