2024-11-19 16:44:39 +08:00
|
|
|
branch=$(git branch --show-current)
|
2024-06-12 11:37:23 +08:00
|
|
|
current_version=$(jq -r '.version' lerna.json)
|
2024-11-06 11:07:01 +08:00
|
|
|
IFS='.-' read -r major minor patch label pre <<< "$current_version"
|
2024-06-12 11:37:23 +08:00
|
|
|
|
2024-11-19 16:44:39 +08:00
|
|
|
if [ "$branch" == "main" ]; then
|
|
|
|
# rc
|
2024-11-06 11:07:01 +08:00
|
|
|
if [ "$1" == '--is-feat' ]; then
|
2024-11-19 16:44:39 +08:00
|
|
|
new_version="$major.$minor.0"
|
2024-06-12 11:37:23 +08:00
|
|
|
echo $new_version;
|
2024-11-06 11:07:01 +08:00
|
|
|
else
|
2024-06-12 11:37:23 +08:00
|
|
|
new_patch=$((patch + 1))
|
2024-11-19 16:44:39 +08:00
|
|
|
new_version="$major.$minor.$new_patch"
|
2024-06-12 11:37:23 +08:00
|
|
|
echo $new_version;
|
2024-11-06 11:07:01 +08:00
|
|
|
fi
|
2024-11-19 16:44:39 +08:00
|
|
|
elif [ "$branch" == "next" ]; then
|
|
|
|
# beta
|
|
|
|
if [ "$1" == '--is-feat' ]; then
|
2024-11-19 20:09:29 +08:00
|
|
|
new_version="$major.$minor.0-beta.1"
|
2024-11-19 16:44:39 +08:00
|
|
|
echo $new_version;
|
|
|
|
else
|
|
|
|
new_pre=$((pre + 1))
|
|
|
|
new_version="$major.$minor.$patch-beta.$new_pre"
|
|
|
|
echo $new_version;
|
|
|
|
fi
|
|
|
|
elif [ "$branch" == "develop" ]; then
|
2024-11-06 11:07:01 +08:00
|
|
|
# alpha
|
|
|
|
if [ "$1" == '--is-feat' ]; then
|
|
|
|
new_minor=$((minor + 1))
|
2024-11-19 20:09:29 +08:00
|
|
|
new_version="$major.$new_minor.0-alpha.1"
|
2024-11-06 11:07:01 +08:00
|
|
|
echo $new_version;
|
|
|
|
else
|
2024-11-19 16:44:39 +08:00
|
|
|
new_pre=$((pre + 1))
|
|
|
|
new_version="$major.$minor.$patch-alpha.$new_pre"
|
|
|
|
echo $new_version;
|
2024-11-06 11:07:01 +08:00
|
|
|
fi
|
2024-11-19 16:44:39 +08:00
|
|
|
else
|
|
|
|
exit 1
|
2024-06-12 11:37:23 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
lerna version $new_version --preid alpha --force-publish=* --no-git-tag-version -y
|
|
|
|
|
2024-08-26 23:40:48 +08:00
|
|
|
echo $PRO_PLUGIN_REPOS | jq -r '.[]' | while read i; do
|
|
|
|
cd ./packages/pro-plugins/@nocobase/$i
|
|
|
|
git add .
|
|
|
|
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../../../lerna.json)"
|
|
|
|
git tag v$(jq -r '.version' ../../../../lerna.json)
|
|
|
|
cd ../../../../
|
|
|
|
done
|
2024-09-04 12:58:51 +08:00
|
|
|
echo $CUSTOM_PRO_PLUGIN_REPOS | jq -r '.[]' | while read i; do
|
|
|
|
cd ./packages/pro-plugins/@nocobase/$i
|
|
|
|
git add .
|
|
|
|
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../../../lerna.json)"
|
|
|
|
git tag v$(jq -r '.version' ../../../../lerna.json)
|
|
|
|
cd ../../../../
|
|
|
|
done
|
2024-05-07 16:57:18 +08:00
|
|
|
cd ./packages/pro-plugins
|
|
|
|
git add .
|
|
|
|
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' ../../lerna.json)"
|
|
|
|
git tag v$(jq -r '.version' ../../lerna.json)
|
2024-05-09 15:42:08 +08:00
|
|
|
#git push --atomic origin main v$(jq -r '.version' ../../lerna.json)
|
2024-05-07 16:57:18 +08:00
|
|
|
cd ../../
|
2023-09-13 18:29:38 +08:00
|
|
|
git add .
|
|
|
|
git commit -m "chore(versions): 😊 publish v$(jq -r '.version' lerna.json)"
|
|
|
|
git tag v$(jq -r '.version' lerna.json)
|
2024-06-12 11:37:23 +08:00
|
|
|
# git push --atomic origin main v$(jq -r '.version' lerna.json)
|
2024-11-06 11:07:01 +08:00
|
|
|
|