fluxa-desktop/scripts/bump-version.sh
KhooLy a93c926014 fix(build): stop ignoring scripts/, breaking every CI build
.gitignore had a blanket "scripts/" entry from the repo's initial
commit. Since then, package.json's build/typecheck scripts started
depending on scripts/gen-core-methods.mjs, which was never actually
committed — it only worked locally because the file happened to exist
on disk. Every fresh CI checkout (and any new clone) failed at
`npm run build` with MODULE_NOT_FOUND. Track gen-core-methods.mjs and
bump-version.sh; neither contains secrets or machine-specific content.
2026-07-07 02:36:18 +03:00

16 lines
505 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
if [ $# -ne 1 ]; then
echo "usage: scripts/bump-version.sh <new-version>" >&2
exit 1
fi
new_version="$1"
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
sed -i "s/^ \"version\": \".*\"/ \"version\": \"$new_version\"/" "$root_dir/package.json"
echo "Bumped to $new_version. Review the diff, then:"
echo " git add -A && git commit -m \"chore: bump version to $new_version\""
echo " git tag v$new_version && git push origin master v$new_version"