Closed flavio closed 5 months ago
Opened all the needed PRs for policies. Tried with existing tools such as all-repos, but it was not worth the hassle. At the end I did:
Clone repos:
gh repo list kubewarden --language rust --topic kubewarden-policy | while read -r repo \_; do
gh repo clone "$repo" "$repo"
done
Edit repos:
for repo in kubewarden/*; do
echo "$repo"
pushd "$repo"
git checkout -b wasip1
find ./ -type f -exec sed -i 's/cargo build --target=wasm32-wasi --release/cargo build --target=wasm32-wasip1 --release/g' {} \;
find ./ -type f -exec sed -i 's/cp target\/wasm32-wasi\/release\/\*.wasm policy.wasm/cp target\/wasm32-wasip1\/release\/\*.wasm policy.wasm/g' {} \;
git add *
git commit --file ../../message.txt
popd
done
Use editor to loop through all aparitions of wasm32
to double check
Open PRs:
for repo in kubewarden/*; do
echo "$repo"
pushd "$repo"
# note: `--project Kubewarden` doesn't get recognized for all repos
gh pr create --assignee viccuad --base main --title 'chore(deps): move to wasm32-wasip1 target' --body-file ../../body-pr.txt --fill
popd
done
All Rust policies done, closing as done.
The
wasm32-wasi
target is deprecated and is has already been renamedwasm32-wasip1
. See this blog postActions: