mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-01 19:58:15 +08:00
38123129e2
Some checks failed
Build docker image / build-and-push (push) Waiting to run
Build pro image / build-and-push (push) Waiting to run
Deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase frontEnd test / frontend-test (18) (push) Waiting to run
NocoBase backend test / sqlite-test (20, false) (push) Has been cancelled
NocoBase backend test / sqlite-test (20, true) (push) Has been cancelled
NocoBase backend test / postgres-test (public, 20, nocobase, false) (push) Has been cancelled
NocoBase backend test / postgres-test (public, 20, nocobase, true) (push) Has been cancelled
NocoBase backend test / postgres-test (public, 20, public, false) (push) Has been cancelled
NocoBase backend test / postgres-test (public, 20, public, true) (push) Has been cancelled
NocoBase backend test / postgres-test (user_schema, 20, nocobase, false) (push) Has been cancelled
NocoBase backend test / postgres-test (user_schema, 20, nocobase, true) (push) Has been cancelled
NocoBase backend test / postgres-test (user_schema, 20, public, false) (push) Has been cancelled
NocoBase backend test / postgres-test (user_schema, 20, public, true) (push) Has been cancelled
NocoBase backend test / mysql-test (20, false) (push) Has been cancelled
NocoBase backend test / mysql-test (20, true) (push) Has been cancelled
NocoBase backend test / mariadb-test (20, false) (push) Has been cancelled
NocoBase backend test / mariadb-test (20, true) (push) Has been cancelled
Test on Windows / build (push) Has been cancelled
58 lines
1.8 KiB
Bash
Executable File
58 lines
1.8 KiB
Bash
Executable File
current_version=$(jq -r '.version' lerna.json)
|
|
IFS='.-' read -r major minor patch label pre <<< "$current_version"
|
|
|
|
if [[ "$label" == 'beta' || "$2" == '--is-beta' ]]; then
|
|
if [ "$1" == '--is-feat' ]; then
|
|
new_version="$major.$minor.0-beta"
|
|
echo $new_version;
|
|
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
|
|
|
|
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
|
|
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
|
|
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)
|
|
#git push --atomic origin main v$(jq -r '.version' ../../lerna.json)
|
|
cd ../../
|
|
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)
|
|
|