reconcile/scripts/bump-version.sh
Andras Schmelczer 8b8f1d91d9
Fix syncing when network latency is present (#4)
* WIP

* Add debug

* Dedupe inserts

* Add deterministic ordering

* Fix whitespaces

* Update insta

* Add integration test script

* Rename

* Add test

* Working for non-deletes

* omg it mostly works for deletes

* Isdeleted fix

* remove created dates

* update api

* Take document id

* No max attempt

* works

* Use string uuids

* .

* working!!!! (hopefully)

* Improve bundling

* Add module

* lint

* .

* lint

* Fix CI

* use toolchain

* clean up

* Add useSlowFileEvents

* Delete fuzz

* Fix CI

* use docker

* fix script

* clean up

* Clean up

* change node version

* Build docker image on every commit

* fix ci

* 1 db per vault

* Add scritps folder

* Bump versions

* Lint

* .

* Fix tests for real

* Style

* .

* try

* Consistent ordering

* Fix tests

* hmm

* .

* Clean up diff

* Fixes

* .

* Fix version bump

* .

* .

* .
2025-03-16 20:13:49 +00:00

52 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
set -e
if [[ -z $1 ]]; then
echo "Usage: $0 {patch|minor|major}"
exit 1
fi
if [[ $1 =~ ^(patch|minor|major)$ ]]; then
echo "Creating a new '$1' version"
else
echo "Invalid argument: $1"
echo "Usage: $0 {patch|minor|major}"
exit 1
fi
if [[ -n $(git status --porcelain) ]]; then
echo "Your working directory is not clean. Please commit or stash your changes before proceeding."
exit 1
else
echo "Your working directory is clean."
fi
echo "Bumping backend versions"
cd backend
cargo set-version --bump patch
echo "Bumping frontend versions"
cd ../frontend
npm version patch --workspaces
echo "Updating frontend dependencies to match the new backend versions"
cd ../backend/sync_lib
wasm-pack build --target web --features console_error_panic_hook
cd ../../frontend
npm install
cd ..
cp frontend/obsidian-plugin/manifest.json manifest.json # for BRAT, otherwise it wouldn't update
Commit and tag
git add .
TAG=$(node -p "require('./plugin/package.json').version")
git commit -m "Bump versions to $TAG"
git push
echo "Tagging $TAG"
git tag -a $TAG -m "Release $TAG"
git push origin $TAG
echo "Done"