mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
08938b8c70
* feat: workspace api * feat: added cloud apis for add and delete workspace * feat: add and delete workspace event handlers * chore: rust fmt * chore: save user workspace * test: add test * test: add test * chore: add to gitignore * feat: update api add name to workspace * chore: cargo clippy and rename to create * chore: add envrc and direnv to gitignore * chore: change name to create workspace instead of add workspace * chore: update client api rev * feat: add create workspace impl * chore: restore gitignore to original * test: fix create workspace event test * fix: change delete workspace input * fix: compile * fix: create workspace test * feat: add error code for request payload too large * chore: remove cargo backup files * feat: add is async option for upload file handler * chore: update client api version --------- Co-authored-by: nathan <nathan@appflowy.io>
30 lines
808 B
Bash
Executable File
30 lines
808 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Ensure a new revision ID is provided
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: $0 <new_revision_id>"
|
|
exit 1
|
|
fi
|
|
|
|
NEW_REV="$1"
|
|
echo "New revision: $NEW_REV"
|
|
directories=("rust-lib" "appflowy_tauri/src-tauri" "appflowy_web/wasm-libs")
|
|
|
|
for dir in "${directories[@]}"; do
|
|
echo "Updating $dir"
|
|
pushd "$dir" > /dev/null
|
|
|
|
sed -i.bak "/^client-api[[:alnum:]-]*[[:space:]]*=/s/rev = \"[a-fA-F0-9]\{6,40\}\"/rev = \"$NEW_REV\"/g" Cargo.toml
|
|
|
|
# Detect changed crates
|
|
client_api_crates=($(grep -E '^client-api[a-zA-Z0-9_-]* =' Cargo.toml | awk -F'=' '{print $1}' | tr -d ' '))
|
|
|
|
# Update only the changed crates in Cargo.lock
|
|
for crate in "${client_api_crates[@]}"; do
|
|
echo "Updating $crate"
|
|
cargo update -p $crate
|
|
done
|
|
|
|
popd > /dev/null
|
|
done
|