Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-11-06 03:22:27 +00:00
commit 8726b5d9c3

View File

@ -1,13 +1,32 @@
current_version=$(jq -r '.version' lerna.json)
IFS='.-' read -r major minor patch label <<< "$current_version"
IFS='.-' read -r major minor patch label pre <<< "$current_version"
if [ "$1" == '--is-feat' ]; then
new_version="$major.$minor.0-beta"
if [ "$label" == 'beta' ]; then
if [ "$1" == '--is-feat' ]; then
new_minor=$((minor + 1))
new_version="$major.$new_minor.0-beta"
echo $new_version;
else
else
new_patch=$((patch + 1))
new_version="$major.$minor.$new_patch-$label"
echo $new_version;
fi
else
# alpha
if [ "$1" == '--is-feat' ]; then
new_minor=$((minor + 1))
new_version="$major.$new_minor.0-alpha.0"
echo $new_version;
else
if [ -z "$pre" ]; then
new_version="$major.$minor.$patch-alpha.0"
echo $new_version;
else
new_pre=$((pre + 1))
new_version="$major.$minor.$patch-alpha.$new_pre"
echo $new_version;
fi
fi
fi
lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y
@ -36,3 +55,4 @@ git add .
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' lerna.json)"
git tag v$(jq -r '.version' lerna.json)
# git push --atomic origin main v$(jq -r '.version' lerna.json)