mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
42ba9dfaea
# Objective Extracts the state mechanisms into a new crate called "bevy_state". This comes with a few goals: - state wasn't really an inherent machinery of the ecs system, and so keeping it within bevy_ecs felt forced - by mixing it in with bevy_ecs, the maintainability of our more robust state system was significantly compromised moving state into a new crate makes it easier to encapsulate as it's own feature, and easier to read and understand since it's no longer a single, massive file. ## Solution move the state-related elements from bevy_ecs to a new crate ## Testing - Did you test these changes? If so, how? all the automated tests migrated and passed, ran the pre-existing examples without changes to validate. --- ## Migration Guide Since bevy_state is now gated behind the `bevy_state` feature, projects that use state but don't use the `default-features` will need to add that feature flag. Since it is no longer part of bevy_ecs, projects that use bevy_ecs directly will need to manually pull in `bevy_state`, trigger the StateTransition schedule, and handle any of the elements that bevy_app currently sets up. --------- Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
77 lines
1.3 KiB
Bash
77 lines
1.3 KiB
Bash
# if crate A depends on crate B, B must come before A in this list
|
|
crates=(
|
|
bevy_utils/macros
|
|
bevy_utils
|
|
bevy_ptr
|
|
bevy_macro_utils
|
|
bevy_derive
|
|
bevy_math
|
|
bevy_tasks
|
|
bevy_reflect/derive
|
|
bevy_reflect
|
|
bevy_ecs/macros
|
|
bevy_ecs
|
|
bevy_state/macros
|
|
bevy_state
|
|
bevy_app
|
|
bevy_time
|
|
bevy_log
|
|
bevy_dynamic_plugin
|
|
bevy_asset/macros
|
|
bevy_asset
|
|
bevy_audio
|
|
bevy_core
|
|
bevy_diagnostic
|
|
bevy_hierarchy
|
|
bevy_transform
|
|
bevy_window
|
|
bevy_encase_derive
|
|
bevy_render/macros
|
|
bevy_mikktspace
|
|
bevy_render
|
|
bevy_core_pipeline
|
|
bevy_input
|
|
bevy_gilrs
|
|
bevy_animation
|
|
bevy_pbr
|
|
bevy_gltf
|
|
bevy_scene
|
|
bevy_sprite
|
|
bevy_gizmos/macros
|
|
bevy_gizmos
|
|
bevy_text
|
|
bevy_a11y
|
|
bevy_ui
|
|
bevy_winit
|
|
bevy_dev_tools
|
|
bevy_internal
|
|
bevy_dylib
|
|
bevy_color
|
|
)
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "You have local changes!"
|
|
exit 1
|
|
fi
|
|
|
|
pushd crates
|
|
|
|
for crate in "${crates[@]}"
|
|
do
|
|
echo "Publishing ${crate}"
|
|
cp ../LICENSE-MIT "$crate"
|
|
cp ../LICENSE-APACHE "$crate"
|
|
pushd "$crate"
|
|
git add LICENSE-MIT LICENSE-APACHE
|
|
cargo publish --no-verify --allow-dirty
|
|
popd
|
|
sleep 20
|
|
done
|
|
|
|
popd
|
|
|
|
echo "Publishing root crate"
|
|
cargo publish --allow-dirty
|
|
|
|
echo "Cleaning local state"
|
|
git reset HEAD --hard
|