17 lines
449 B
Bash
17 lines
449 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# Get current version
|
||
|
current_version=$(jq -r '.version' package.json)
|
||
|
echo "Current version: $current_version"
|
||
|
|
||
|
# Determine new version (example: increment patch)
|
||
|
IFS='.' read -r major minor patch <<< "$current_version"
|
||
|
new_patch=$((patch + 1))
|
||
|
new_version="$major.$minor.$new_patch"
|
||
|
echo "New version: $new_version"
|
||
|
|
||
|
# Update package.json
|
||
|
jq ".version = \"$new_version\"" package.json > temp.json && mv temp.json package.json
|