Add license files to all published crates (#4828)

# Objective

Add our licenses to every published crate

Fixes #4719

## Solution

- Copy licenses to every crate before publishing
This commit is contained in:
Niklas Eicker 2022-05-30 22:28:32 +00:00
parent 53bcecbbfc
commit 48289984ea

View file

@ -39,13 +39,29 @@ crates=(
bevy_dylib
)
cd crates
if [ -n "$(git status --porcelain)" ]; then
echo "You have local changes!"
exit 1
fi
pushd crates
for crate in "${crates[@]}"
do
echo "Publishing ${crate}"
(cd "$crate"; cargo publish --no-verify)
cp ../docs/LICENSE-MIT "$crate"
cp ../docs/LICENSE-APACHE "$crate"
pushd "$crate"
git add LICENSE-MIT LICENSE-APACHE
cargo publish --no-verify --allow-dirty
popd
sleep 20
done
cd ..
cargo publish
popd
echo "Publishing root crate"
cargo publish --allow-dirty
echo "Cleaning local state"
git reset HEAD --hard